ST. LOUIS — Jason Rogers feels right at home in the spoiler role.
The Milwaukee rookie hit a pinch-hit grand slam in the ninth inning off St. Louis closer Trevor Rosenthal to lift the Brewers to an 8-4 victory over the Cardinals on Sunday.
The Cardinals' NL Central lead is three games over Pittsburgh. The Cardinals' magic number for clinching the crown was cut to four after the Pirates lost to Chicago later Sunday.
St. Louis has lost two of three heading into a three-game showdown in Pittsburgh starting Monday.
"It's always good to beat guys at the end and maybe try and ruin their season," Rogers said. "It was special, a grand slam off a tough righty, one of the best in the game."
Khris Davis homered twice and drove in four runs for the Brewers, who scored seven runs in the ninth.
"This was a great come-from-behind win," Davis said. "We were all having fun out there. It was just a great feeling."
All four Milwaukee batters reached safely against Rosenthal (2-4), who had converted 47 of 49 save opportunities. His last blown save came July 12 at Pittsburgh.
"I can't explain how it happened," Rosenthal said. "Everything felt fine. I tried to get in a groove and couldn't quite get there. Just one of those days."
Rogers, who is 13 of 48 as a pinch hitter, ripped his second pinch-hit homer of the season and first grand slam of his career.
Davis added a three-run homer later in the ninth off Seth Maness for an 8-3 lead.
"In the ninth, we just tried to give it our best chance with good at-bats," Milwaukee manager Craig Counsell said. "Everything fell into place. Got some good pinch-hit efforts."
David Goforth (1-0) picked up the win with one inning of relief.
Francisco Rodriguez recorded his 37th save in 39 chances. He retired Brandon Moss with two on to end the game.
Matt Carpenter and Stephen Piscotty hit back-to-back homers in the seventh to give the Cardinals a 3-1 lead.
Hernan Perez then started the Milwaukee ninth with a single. Martin Maldonado was hit by a pitch and Jonathan Lucroy walked to load the bases for Rogers.
St. Louis starter John Lackey allowed one run on five hits over seven innings for his 26th quality start in 32 outings this season.
"It's one game, we can't get too crazy about it," Lackey said. "We've just got to play better on the road."
Carpenter slammed a one-out home run off Jeremy Jeffress to break a 1-all tie. Piscotty followed with his seventh homer of the season.
Despite the loss, the St. Louis players realize they are still in the driver's seat in the division race.
"Every loss has the same feeling, we're not going to dwell on it," Carpenter said. "We've got a chance to go out and win the division in the next few days. That's all we can ask for."
The Cardinals hit back-to-back homers for the third time this season.
Davis, who has a team-high 26 homers, gave the Brewers a 1-0 lead with a home run off Lackey in the second. Davis has three homers in 17 career at-bats against Lackey.
The Cardinals tied the game in the fourth on singles by Matt Adams and Kolten Wong and an RBI groundout by Tony Cruz.
The Cardinals recorded their 37th sellout of the season and finished with 3,520,889 in attendance, an average of 43,468 per game. It is the second-highest attendance in the majors behind the Los Angeles Dodgers.
Cardinals: INF Carpenter returned to the lineup after leaving Saturday's 5-1 win with tightness in his left hip.
Brewers; RHP Jorge Lopez will make his major league debut on Tuesday in the first of a three-game series in San Diego. He will be opposed by RHP Tyson Ross (10-11, 3.17).
Cardinals: RHP Lance Lynn (12-10, 3.16) faces LHP J.A. Happ (10-8, 3.88) on Monday in the first of a crucial three-game series in Pittsburgh.