Updated

MILWAUKEE (AP) Tommy Pham homered twice and tripled, Matt Carpenter added a solo shot and Jaime Garcia went 6 1-3 innings to lead the St. Louis Cardinals to a 5-4 victory over the Milwaukee Brewers on Wednesday night.

Pham's two-run shots came in the second and the fourth off Milwaukee starter Wily Peralta (5-9). It was the rookie's third and fourth home runs of the season and first multi-homer effort in 43 career games. He was recalled from Triple-A Memphis on August 17 when Randal Grichuk went on the disabled list with a right elbow strain.

Carpenter led off the third with his 22nd home run and 74th RBI of the season, both team highs.

Jaime Garcia (9-5) won for the third time in his last four starts and improved to 6-1 in nine starts since Aug. 1, helping the Cardinals go 8-1 over that span.

Garcia's only trouble came in the fourth when the Brewers pushed across four runs, highlighted by Martin Maldonado's three-run homer. Garcia allowed eight hits, struck out four, walked one in 6 1-3 innings as the Cardinals won their third straight after a 2-8 skid.

Jonathan Broxton retired the side in order in the eighth. Trevor Rosenthal struck out the side in the ninth for his 45th save.

Peralta hadn't allowed a home run in four starts since Aug. 19 against the Miami Marlins, but Pham and Carpenter ended that quickly. Peralta walked two and struck out two before being pinch hit for in the bottom of the fourth. He lost all four starts this season and is 0-5 with a 5.73 ERA in his last six against St. Louis.

The first two batters singled in the Brewers half of the fourth before Elian Herrera knocked in a run with a bloop base hit. Maldonado followed with his fourth home run of the season, a three-run drive that landed in the Cardinals' bullpen in right-center field.

UP NEXT

Cardinals: RHP John Lackey (11-9, 2.89 ERA) makes his team-leading 30th start and fourth against the Brewers this season. He is 2-0 with a 2.70 over that span.

Brewers: RHP Jimmy Nelson (11-12, 3.95 ERA) makes his team-leading 30th start and third against the Cardinals this season. He is 0-1 with a 7.50 ERA in the two prior starts. Overall, he is 0-4 with an 8.72 ERA in five career games, including four starts, facing St. Louis.

TRAINER'S ROOM

Cardinals: 1B Matt Adams went 0 for 1 with a walk Tuesday night in his first start since May 26. He missed 91 games with a right quad injury that required surgery. Stephen Piscotty replaced him at first Wednesday night in a precautionary move. The Cardinals plan to bring Adams back slowly. However, he pinch hit for Seth Maness and lined out to end the Cardinals' eighth inning.

Brewers: RF Ryan Braun missed the game with tightness in his lower back. manager Craig Counsell said Braun was day-to-day. ''I'm definitely hopeful that he plays tomorrow,'' Counsell said. ''It was a little tight yesterday, worse today.''