MILWAUKEE (AP) -- Jonathan Villar had to wait to celebrate his first walk-off hit in the major leagues.
Villar hit a game-ending RBI single with two outs in the ninth, lifting the Milwaukee Brewers to a 4-3 victory over the St. Louis Cardinals on Friday night.
The play had to be reviewed while Villar and his teammates gathered behind the mound.
''We were pretty confident he was safe,'' Brewers manager Craig Counsell said.
Villar's hit, off Seung Hwan Oh, got past diving third baseman Greg Garcia. Left fielder Tommy Pham's throw to the plate was on line and Yadier Molina slapped a quick tag on Kirk Nieuwenhuis as he slid. Home plate umpire Will Little ruled Nieuwenhuis safe, leading to an argument from Molina.
The call was confirmed after a brief review setting off a celebration.
''I was ready for that turn at-bat,'' Villar said.
Nieuwenhuis said getting a running lead with a 3-2 count on Villar was crucial in beating the throw to the plate.
''It was really important because I had to avoid the third baseman, too,'' he said. ''He dove for the ball and I kind of had to re-route and I almost rolled an ankle because I had to avoid him and touch the bag.''
Chris Carter homered twice for Milwaukee, and Jonathan Lucroy also went deep. Jeremy Jeffress (2-4) got the win in relief.
Nieuwenhuis led off the ninth with a walk off Trevor Rosenthal (2-4). He moved to second on a sacrifice by Hernan Perez.
Carter connected for a towering leadoff drive in the second against Michael Wacha, but the Cardinals jumped in front on consecutive run-scoring singles by All-Star Aledmys Diaz and Matt Holliday in the third.
The Brewers regained the lead in the sixth on back-to-back home runs by Lucroy and Carter. Lucroy's home run, which bounced back onto the field, was upheld after a review. It was Carter's fourth multihomer game this season.
Wacha was hit in the lower right leg by a low liner off the bat of Villar with one out in the seventh. The ball, which struck Wacha on the right heel, ricocheted to Garcia, who threw Villar out at first.
Wacha remained sprawled on the mound for several minutes while the team trainer examined his leg before walking off the field on his own.
Molina's leadoff homer in the eighth against Will Smith tied it at 3.
Milwaukee's Jimmy Nelson allowed two runs and six hits in six innings. He walked four, one intentionally, and struck out two.
Wacha surrendered three runs and five hits in 6 2/3 innings. He struck out eight and walked two.
The Brewers recalled INF Yadiel Rivera from Triple-A Colorado Springs. He fills the roster spot of Aaron Hill, who was traded on Thursday to Boston for Aaron Wilkerson and Wendell Rijo.
Hernan Perez and Will Middlebrooks will share third-base duties with the departure of Hill, who had been the everyday starter at the position, Counsell said.
After throwing out Garcia on a ground ball leading off the game, Brewers 2B Scooter Gennett had to duck out of the way of a swooping pigeon.
NO ALL-STAR NOD FOR BRAUN
Brewers OF Ryan Braun finished fifth out of five players vying for the final spot on the National League All-Star team. San Francisco Giants first baseman Brandon Belt won the fan balloting.
Cardinals: 3B Jhonny Peralta (left thumb) took batting practice but didn't start. He pinch-hit in the ninth and flied out to right field.
Cardinals: Carlos Martinez (7-6, 2.90 ERA) is winless in his last four starts despite a 1.33 ERA. Martinez is 2-1 with a 1.08 ERA in five career starts versus Milwaukee.
Brewers: Chase Anderson (4-9, 5.49) is 0-3 with a 10.91 ERA over his last four starts. He is 0-1 with a 2.61 ERA in two starts against St. Louis this season.