ST. LOUIS -- The Cardinals hadn't lost their grip on first place, nor had a sense of panic emerged. But in the minutes after celebrating a walk-off single by Yadier Molina, players made it no secret that the final game of this homestand was a game they desperately wanted to have.
"We needed that one," Matt Holliday said of the Cardinals' 7-6 victory over the Cubs in front of 45,538 at Busch Stadium on Tuesday. "We needed to win today."
A four-game losing streak prompted such sense of urgency. The Cardinals showed up at the ballpark staring at the possibility of playing a two-series homestand and leaving without a win. They erased two different deficits during Tuesday's game to ensure that wouldn't be the case.
"To get a win like that is big for us," Molina said. "We never quit. We're going to battle. We're going to play hard the whole nine innings."
That final inning was the tipping point for the Cardinals, whose back-and-forth affair with the Cubs had just taken a pair of contrasting turns.
With the game tied at 5, rookie Matt Carpenter delivered a solo homer to give the Cardinals an eighth-inning lead. It marked just the second time since Friday that St. Louis had held an advantage. The only other lead had lasted a mere half-inning.
This one would as well.
Tyler Greene followed Carpenter's blast with a one-out triple. He didn't score, though, and that loomed large when Jason Motte served up a game-tying homer to Alfonso Soriano in the ninth. The blown save was Motte's second in eight tries this season.
Soriano hadn't homered in 119 at-bats this season.
Holliday opened the bottom half of the ninth with a single, his third hit of the game. Two outs later, with Holliday standing on second, Molina squeaked a ball just past the reach of second baseman Darwin Barney, who nicked the ball with his glove after a diving attempt. The ball trickled into right field, giving Holliday enough time to score the winning run.
"I was just trying to put the ball in play, hoping it would find some hole," Molina said.
"I thought I was going to get there," Barney said. "One-quarter of an inch from saving a run."
Instead of saving a run, Barney's tip set off a celebration.
"It was good for the team to get this win and end this little funk that we've been in," said Greene, who fell a homer short of hitting for the cycle while making the start at second. "It showed a lot from us not backing down and pushing."
The Cardinals did, again, fall behind early. But they punched back early, too, as a see-saw contest ensued.
Chicago pounced on Kyle Lohse in the first inning, scoring three times as five of the first six batters recorded a hit over an 18-pitch span.
"I think they did a good job of watching film," Lohse said afterward. "That's my game plan, to come at them throwing hard early. Today, they jumped all over my stuff."
But Lohse settled and followed that spree of hits by retiring 14 of the next 15 Chicago batters. And as he did so, his offense evened the game.
Allen Craig and David Freese drove home first-inning runs. Greene doubled and scored against Cubs starter Paul Maholm in the second.
"That's huge, the way the bats came alive right there and hit them back," manager Mike Matheny said. "I think you could feel the momentum shift."
Holliday drilled a solo homer in the fifth to give the Cardinals a 4-3 lead. He then watched Cubs cleanup hitter Bryan LaHair match it with his own in the sixth. Of LaHair's 10 home runs this season, five have now come against St. Louis.
"I threw him a changeup down there and he kind of surprised me with the distance that ball carried," Lohse said. "I didn't feel like it was a bad pitch, just maybe the wrong pitch to that guy."
The hit also extended LaHair's on-base streak to 32 games.
Though Lohse gave the Cardinals the deep start they've been craving, he left trailing. A pair of non-sinking sinkers in the seventh led to Chicago scoring its fifth run of the game, also with two out. Lohse's day ended after Reed Johnson delivered a pinch-hit RBI that put the Cubs ahead, 5-4.
His ability to keep his pitch count down -- he finished having thrown 90 -- helped Lohse become the first Cardinals starter in seven games to pitch past the sixth inning. Though he still felt some soreness in his left hamstring, which Lohse strained in his previous start, it did not, he said, affect him on the mound.
Lohse was taken off the hook for the loss by Craig, whose RBI single off reliever Kerry Wood again evened the game. It also continued Craig's unbelievable start since returning from the disabled list. In 12 games, he now has 18 RBIs.
"He's just a good hitter," Matheny said. "He can make you pay when you make mistakes. Right now, he's seeing the ball very well."
By snapping their losing streak now, the Cardinals avoided losing five straight for the first time since dropping six in a row from June 10-16, 2011. The walk-off win was their second of the season, and the club is now 2-5 in one-run games.
"It was a great moment," Molina said. "To get the win like that, especially when you've lost four games in a row, it's exciting."
Jenifer Langosch is a reporter for MLB.com. Read her blog, By Gosh, It's Langosch, and follow her on Twitter @LangoschMLB. This story was not subject to the approval of Major League Baseball or its clubs.