MILWAUKEE (AP) — Daniel Vogelbach relishes having the opportunity to change the complexion of a game with one swing of the bat.

He made the most of that chance Sunday and delivered one of the most memorable moments in the Milwaukee Brewers' charmed season.

Vogelbach delivered a pinch-hit grand slam off Alex Reyes to cap a five-run rally in the ninth inning that gave the NL Central-leading Brewers a 6-5 victory over the St. Louis Cardinals.

“I enjoy being in those situations, whether I fail or whether I succeed,” Vogelbach said after hitting his first career walk-off homer and the first by any Brewers player this season.

“As a competitor, you always want to be in those situations and be the guy that steps up to the plate in that situation. I’m just happy that I was able to come through for the guys who grinded all game," he said.

Reyes (5-8) entered the game after the Brewers had loaded the bases off Giovanny Gallegos. Vogelbach hit a 1-0 pitch high above the outstretched arm of right fielder Dylan Carlson, who made a leaping attempt in front of the wall.

Vogelbach was mobbed at home plate and got doused with the contents of a Gatorade bucket. He just rejoined the team Wednesday after spending over two months on the injured list while healing his hamstring.

During his time away, the Brewers acquired first baseman Rowdy Tellez, a move that changed Vogelbach's role with the team.

“Vogey has come back and he’s got kind of a different job,” Brewers manager Craig Counsell said. “In one sense, it’s a shame because he got hurt. We made an acquisition to cover for it and he’s done a nice job. So, for now, this is his job, being a bat off the bench. To deliver in that way and you don’t get a big sample of opportunities is a real credit to him.”

Milwaukee's comeback extended its NL Central lead to 11 games over Cincinnati and dealt a major blow to the Cardinals, who are chasing a wild-card berth. The Cardinals capped a 5-5 road trip and now begin a seven-game home stand against the Los Angeles Dodgers and Cincinnati.

“We’ve just got to figure out a way to get back on the horse and get back after it,” Cardinals manager Mike Shildt said. "It’s a discouraging one. We played outstanding baseball this whole road trip. We’d like to have a little bit more to show for it. The strong survive. We’ve got to continue to be strong and go out and get the best we’ve got with what we have.”

The Brewers trailed 5-1 before starting their comeback against Gallegos, who began the ninth after getting the final two outs in the eighth.

Jackie Bradley Jr. hit a leadoff double and scored on Luke Maile’s single to make it 5-2. Jace Peterson’s double and Eduardo Escobar’s walk loaded the bases with one out.

Then Vogelbach hit his first homer since June 14.

Miguel Sánchez (2-0) pitched a scoreless ninth to earn the victory. Milwaukee’s Pablo Reyes celebrated his 28th birthday by hitting his first homer of the season.

Tyler O'Neill had three hits, including a home run, for the Cardinals. Harrison Bader added a two-run double on a slow roller that got past Brewers third baseman Eduardo Escobar. Starter Jon Lester allowed one run in just 5 1/3 innings to help the Cardinals take the lead over All-Star right-hander Corbin Burnes.

“The first eight innings were about as good of baseball as you’d want to play,” Shildt said.

But the Cardinals left 14 men on base and couldn't put the game out of reach. The Brewers eventually made them pay.

Milwaukee loaded the bases in the eighth, but first baseman Paul Goldschmidt ended the threat by snaring a liner to rob Christian Yelich of an extra-base hit that could have brought home three runs.

“After that line drive gets caught with Yeli, it feels like that was your shot,” Counsell said. “It’s deflating when that ball gets caught. It feels like it should be 5-4 and the ninth inning is going to be a tough inning. But the guys did a great job, starting with Jackie, putting together a tough ninth inning. Just having tough at-bats against a good pitcher. That set it up for Vogey’s heroics.”

TRAINER’S ROOM

Brewers SS Willy Adames went on the 10-day injured list with a left quadriceps strain. The Brewers recalled utilityman Tim Lopes from Triple-A Nashville.

UP NEXT

Cardinals: Start a four-game home series with the Los Angeles Dodgers on Monday afternoon. RHP Miles Mikolas (0-1, 4.41 ERA) pitches for the Cardinals. The Dodgers will start RHP Max Scherzer (12-4, 2.40).

Brewers: Open a three-game home series with the Philadelphia Phillies on Monday afternoon. Brandon Woodruff (9-4, 2.35) pitches for the Brewers and Zack Wheeler (11-9, 3.01) starts for the Phillies in a matchup of All-Star right-handers.

___

Follow Steve Megargee at https://twitter.com/stevemegargee

___

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