ST. LOUIS — Ryan Braun still stands out at opportune times for the Milwaukee Brewers.

"I'm not as good as I was," the 35-year-old said. "But in big moments, I'm the guy still."

Braun hit a go-ahead grand slam off Junior Fernández with two outs in the ninth inning, and the Brewers beat the St. Louis Cardinals 7-6 Sunday to keep up their playoff push by winning for the ninth time in 10 games.

Milwaukee remained one game behind the Chicago Cubs for the second NL wild card and closed within three games of the NL Central-leading Cardinals.

With the Cardinals ahead 4-3, Jon Gant (10-1) walked Ben Gamel and Travis Shaw starting the ninth, struck out Trent Grisham and walked Yasmani Grandal.

Tyler Webb retired Mike Moustakas on a flyout not deep enough to score a run, Fernández relieved and Braun drove a hanging slider to left-centre for his seventh career slam and a 7-4 lead.

"We had one bullet left," Milwaukee manager Craig Counsell said. "Absolutely incredible."

A six-time All-Star, Braun entered with a .133 batting average in September. He hit a tiebreaking home run against Miami on Thursday.

"I believe in myself. I've had a lot of success in those moments," Braun said. "I think I'm able to lock it in a little bit more."

Tommy Edman hit a two-run homer with one out in the bottom of the ninth off Josh Hader, who struck out Harrison Bader and pinch-hitter Tyler O'Neill for his 33rd save in 39 chances.

Bader hit solo homers in the third and seventh innings totalling 909 feet, giving him 10 homers this season.

Matt Albers (7-5) got two outs for the win, and Gant lost for the first time in exactly one year.

Cory Spangenberg hit a two-run homer off Ryan Helsley in the seventh, but Paul DeJong had a two-run homer against Ray Black in the bottom half for a 3-2 lead, a drive that curled just inside the left-field foul pole.

Milwaukee starter Chase Anderson allowed one run and one hit over in four innings.

Cardinals starter Michael Wacha gave up five hits in five scoreless innings and is 0-3 in eight starts and two relief appearances since beating Cincinnati on July 19.

SLUGGING

Milwaukee set a franchise record with 232 homers, one more than in 2007.

EASY PICKINGS?

Milwaukee's final 13 games are against San Diego, Pittsburgh, Cincinnati and Colorado, all teams with losing records.

Defence UP

The Cardinals' nine-game streak without an error, the team's longest since June 2017, ended when Bader bobbled a long drive to centre by Moustakas in the eighth.

TRAINER'S ROOM

Cardinals: Closer Carlos Martinez spent Saturday night in a hospital due to respiratory issues and was not at the ballpark Sunday.

UP NEXT

Brewers: RHP Zach Davies (9-7, 3.77) will take on San Diego RHP Garrett Richards (0-0, 0.00) on Monday in the opener of a four-game series in Milwaukee. The Brewers are 16-12 in his starts this season.

Cardinals: RHP Dakota Hudson (15-7, 3.38) faces Washington RHP Stephen Strasburg (17-6, 3.49) on Monday. Hudson had a career-best five-game winning streak ended with a 2-1 loss to Colorado on Wednesday.

___

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports