After getting out-pitched in the first two games of their series against the St. Louis Cardinals, the Milwaukee Brewers turned the tables Wednesday afternoon.

With starter Wily Peralta turning in 6 1/3 strong innings and the bullpen doing its job as usual, the Brewers salvaged the series finale with a 5-1 victory at Miller Park.

The win allowed the Brewers to avoid a sweep after winning their previous three series via sweeps. They are 11-4 for the season after beating the Cardinals for only the sixth time in the last 22 meetings.

Peralta allowed six hits and just one run during his stint, that coming on a home run by Allen Craig in the sixth inning. Peralta walked one and struck out three in allowing the Brewers to stake a claim that they can pitch with the big boys, too.

The Brewers used a helping hand from the Cardinals to get on the board in the third inning against right-hander Joe Kelly. First baseman Matt Adams booted a leadoff grounder by Logan Schafer, who was bunted to second by Peralta.

Carlos Gomez then shot the gap in right-center for a double that gave the Brewers their first lead of the series.

When Kelly strained his left hamstring trying to leg out a bunt in the fifth inning, it turned to be a big break for the Brewers. They scored three times in the bottom of the inning off reliever Sean Maness, though none of the runs were earned.

The rally started with two outs when Peralta hit a liner to shortstop Jhonny Peralta, who was unable to glove the smash and was charged with an error. Gomez drew a walk and Jean Segura singled into the hole at short, loading the bases.

On a 0-2 fastball, Jonathan Lucroy punched a single through the right side, scoring a pair of runs. Aramis Ramirez continued his clutch hitting with a single to left, driving in Segura to put the Brewers on top, 4-0.