CHICAGO -- The distractions about Dusty Baker are over for now.
Todd Walker and Michael Barrett hit back-to-back homers, the fourth time Chicago did it this week, and the Cubs beat the St. Louis Cardinals for the seventh time in 10 games this season, a 5-4 victory Thursday night.
Before the game, Cubs general manager Jim Hendry said Baker will be the manager for the rest of the season.
Baker is in the fourth and final year of his contract for the Cubs (40-61).
"I'm glad to see he got a vote of confidence and the coaches will be here and we can go out there just worrying about focusing on playing games and not have to talk about their situation for the rest of they year like we have been talking about all year," closer Ryan Dempster said.
Baker hopes his new job security will take the pressure off his players.
"I hope it relieves my team's mind as much as anything. Let's go play baseball, that's the main thing," Baker said. "We have to play well to save my job that's not why we are here. We're here to play baseball. I don't know how much of a lift it is but it's relief to my guys."
The Cubs used six relievers and they combined for 5 2/3 scoreless innings with Dempster closing it for his 18th save.
Juan Encarnacion hit a two-run homer and drove in three runs for the Cardinals.
The Cubs sent nine batters to the plate in the sixth inning when they took advantage of an error by third baseman Scott Rolen to score three runs and take a 5-4 lead.
Trailing 4-2, with two outs and a runner on second, Neifi Perez hit an RBI single off Cardinals starter Jeff Weaver. Juan Pierre added another RBI single off reliever Tyler Johnson (0-2) to tie the game. Johnson was replaced after he walked Walker to load the bases. Barrett followed with a grounder to third off reliever Josh Hancock that Rolen wasn't able to handle allowing Angel Pagan to score and give the Cubs the lead.
Rolen was charged with his eighth error of the season.
"It was exactly the way you draw it up in that situation. A routine ground ball hit to me. It's routine. I'm in position to field the ball. The ball kicks up on me. That's what happened. I tried to react, but I couldn't get there," Rolen said.
Roberto Novoa (1-0) got one out in the sixth inning to earn the victory.
Walker hit his sixth homer of the season in the first and Barrett followed on the next pitch with his 12th. The Cubs last hit consecutive home runs on Tuesday against the New York Mets.
Weaver, making his third start since being acquired from the Los Angeles Angels, pitched 5 2/3 innings, allowing four runs and 10 hits.
The Cardinals took the lead in the second inning. Rolen walked to lead off the inning and Encarnacion followed with a line drive home run to left to tie the game at 2. Jim Edmonds singled and scored from first on Hector Luna's double off the ivy in left, giving the Cardinals the lead.
In the third, Chris Duncan led off with a single and scored on Encarnacion's single, making it 4-2.
Cubs starter Rich Hill was recalled from Triple-A Iowa before the game and was chased in the fourth inning when he loaded the bases with one out. Reliever Michael Wuertz got Albert Pujols to hit into a double play to end the inning.
"I think both teams were playing hard. Both had some clutch at-bats to make things happen. Both missed some opportunities," St. Louis manager Tony La Russa said. "We had a couple break open chances and we missed them."
Hill pitched 3 1/3 innings and gave up four runs and six hits. He has a 7-1 record and a 1.80 ERA with Iowa this season.
- The umpires worked with a three-man crew because Ed Montague missed his flight.
- Pujols finished the game 0-for-4.
- That was Rolen's third error in his last four games against the Cubs.
- St. Louis is winless in Chicago this season. They were swept by the Cubs April 7-9 and the White Sox June 20-22.