One team was destined to leave Busch Stadium on Monday night with a very tough loss.

Despite running out of healthy players and falling behind one of the best young pitchers in the game by three runs, the Milwaukee Brewers made sure they were not that team.

In what had to be the most satisfying victory of what already has been a surprising first month of the season, the Brewers pulled out a 5-3 victory over the St. Louis Cardinals in 12 innings at Busch Stadium.

"This win was huge; it was a great win," said Brewers manager Ron Roenicke. "Going into tomorrow knowing we won this game, we'll do what we can tomorrow."

Only injured players Ryan Braun and Jean Segura were left on the bench by game's end and every reliever in the bullpen other than seldom-used Wei-Chung Wang saw action in the game. Third baseman Aramis Ramirez (bruised elbow) joined the casualty list before the night was done but the Brewers still found a way to prevail.

A 3-3 deadlock finally was broken in the 12th when Khris Davis, who had struck out four times, tripled in the go-ahead run off right-hander Seth Maness and scored on a sacrifice fly by Mark Reynolds.

"I knew that situation was going to come up with me being 0 for 5 with four Ks," said Davis. "I could have gave in or sell out to do whatever I could to help the team win.

"No doubt I still wanted to be in that situation with four Ks. That's the way you've got to approach it. If I didn't want to be up there, the result would have been completely different. It's easy to look at the negative. It's hard to find the positive. But I just know it's there."

Brewers starter Yovani Gallardo entered the game with a horrendous career record (1-11, 6.46 earned run average) against the Cardinals but held his own this time. Gallardo went six innings, allowing seven hits and three runs with one walk and two strikeouts.

When Gallardo departed, St. Louis right-hander Michael Wacha seemingly was in command with a 3-0 lead but the Brewers rallied for three runs in the seventh to tie it. Just like that, the atmosphere got as tense as a playoff game.

It didn't take long for the Cardinals to resume hostilities against Gallardo. Matt Carpenter led off the bottom of the first inning with a double to left-center, moved up on Jon Jay's fly to deep center and scored when Matt Holliday ripped a single off the glove of diving first baseman Reynolds.

Gallardo worked around two-out singles in the fourth by Yadier Molina and Allen Craig by getting Jhonny Peralta to ground into a force at third. And he escaped the fifth unscathed thanks to a pickoff at first base and a nice diving play by shortstop Jeff Bianchi to record an inning-ending force at second base.

Gallardo led off the sixth with an infield single that the Cardinals challenged on replay and lost after a close play at first base. Carlos Gomez then was hit by a pitch, putting two on with no outs.