CHICAGO -- When Travis Wood needed 66 pitches to get through the first two innings of Friday's game, Cubs manager Rick Renteria started to look ahead.
The Cubs' bullpen was overworked, and Renteria had a list of relievers who needed a breather, not another inning.
"I was doing the math in my head and calculating what my next move would be," Renteria said. "Fortunately for us, I didn't have to do anything out of the ordinary. It was a nice job [by Wood] just to keep us in the ballgame."
Wood gutted out five innings and added a solo home run, Ryan Sweeney drove in four runs, including three on his second homer of the year, and Luis Valbuena smacked a go-ahead two-run blast in the seventh to power the Cubs to a 7-6 victory over the Cardinals in front of 41,534, the largest crowd of the season at Wrigley Field.
"It was a good team win," Renteria said.
The Cubs trailed 6-5 in the seventh against Kevin Siegrist, who hit Anthony Rizzo with a pitch to start the inning. One out later, Valbuena launched the first pitch he saw into the bleachers in left-center field for the game-winner.
Renteria wasn't sure if he'd need one of his position players to help pitch after Wood's pitch count soared in the first two innings.
"I really wanted to go deep in the game," Wood said. "I wasn't throwing pitches all over the place, they just fouled off a lot and made me work and I was only able to go five, but luckily I could keep it close."
The Cubs' defense faltered in the first. The Cardinals had runners at first and second and one out when Matt Adams hit a grounder to second baseman Arismendy Alcantara for a potential double play. But the rookie's throw sailed over shortstop Starlin Castro for an error and one run scored. One out later, Jon Jay doubled to left, driving in two more runs, and he reached third on left fielder Chris Coghlan's fielding error.
It took another 34 pitches for Wood to deal with five batters in the second. He got some help from Sweeney in the Chicago half. Valbuena walked and Welington Castillo singled to set up Sweeney's second home run of the season to tie the game at 3. It was the first home run off Cardinals starter Joe Kelly this year.
"What ended up hurting us the whole game through was free bases, whether it's the walks, the hit batsmen," Cardinals manager Mike Matheny said. "Those typically come back to haunt you and they did again today."
With two outs and two on in the third, Sweeney delivered an opposite-field RBI single. The four RBIs are the most by the outfielder since he drove in six on June 23, 2013, against the Astros.
"Whenever I get in there, I have to try to do what I can," Sweeney said.
Wood, who had thrown 94 pitches through four innings, led off the fourth with his third home run of the season. But the lefty then served up home runs to Matt Carpenter leading off the fifth, and one out later, Matt Holliday tied the game at 5 with his ninth homer.
"Any time the wind is blowing out, everybody loves to hit," Wood said. "I missed with a pitch to Carpenter in the fifth, and the pitch wasn't executed as well as it could be to Holliday there. In my opinion, it was a popup that the wind helped out, but that's baseball, especially playing here."
The Cardinals took the lead in the sixth on Oscar Taveras' pinch-hit RBI single off Wesley Wright. But the Cubs' bullpen rallied. Neil Ramirez may have saved the game when he struck out Carpenter to end the eighth and strand a runner at third.
"[Carpenter is] a tough out, a very tough out," Ramirez said. "I tried to reach back and get a little bit extra today. I was able to get it past him and it was exciting."
The win was only the Cubs' fourth in their last 17 games since July 4.
"We've had a rough couple of weeks and we have to keep a positive attitude and play with the guys we have here," Sweeney said. "We can't really look at what's going on outside of the lines. We just have to focus on what we're doing and play hard every day."
And the state of the bullpen?
"We had just enough 'pen to get through it," Renteria said.
Carrie Muskat is a reporter for MLB.com. She writes a blog, Muskat Ramblings, and you can follow her on Twitter @CarrieMuskat. This story was not subject to the approval of Major League Baseball or its clubs.