ST. LOUIS -- Jhoulys Chacin had some extra motivation.
"I can die now," Chacin joked to reporters.
Milwaukee (69-57) snapped a three-game losing streak and moved back ahead of St. Louis (68-57) for the second National League wild card. The Cardinals lost for just the second time in their last 12 games.
"We talk about racking up wins and banking wins and we banked a win today and got a great pitching performance," Brewers manager Craig Counsell said. "I thought we swung the bats pretty good. It's a good win. That's a team that's right in the thick of things and going to be there for the rest of the year."
Chacin (13-4) entered the game 0-7 with a 6.90 ERA in nine career games, including eight starts, against the Cardinals, but shut them out through six innings as the Brewers avoided their first three-game sweep at St. Louis since July 1-3, 2016.
"This might be the biggest game of the season for me," Chacin said. "The Cardinals have always been tough on me and this year it was an obsession."
Chacin has won his last three starts and has given up three runs in his last 19 innings. The Brewers improved to 19-8 in his starts this season.
"I thought he kept them off balance, his slider was again good and his fastball," Counsell said. "He threw fastballs and it was good sequencing."
Moustaskas hammered an 0-2 pitch down the first-base line to score Orlando Arcia and Lorenzo Cain, giving the Brewers a 2-0 lead in the third. Arcia and Cain each stole a base to help get them into scoring position ahead of Moustaskas.
"We always talk about little things and being able to vary our times and our holds and being quick to the plate is important, something that we've done really really well all year," Cardinals interim manager Mike Shildt said of Cain's steal. "The reality is the guy's an accomplished base stealer as well. It was a big play."
John Gant (5-5) gave up two runs on six hits and two walks in 4 1/3 innings. Gant has failed to make it past 4 1/3 innings in three of his last four starts.
"It was just one of those days," Gant said. "I never really found a good, solid groove."
Patrick Wisdom hit his first career home run 414 feet into the bleachers in left-center to lead off the eighth for St. Louis.
The Brewers had lost six of their last eight heading into the game.
"It was a really good day for me and for the team," Chacin said. "I think anything is possible for me and for the team. We win on Sunday, a day game and finally beat the Cardinals. It couldn't get better. From this day I hope we keep rolling."
Yadier Molina started his 27th straight game, a major league record for catchers 35 years or older.
Milwaukee: C Manny Pina (left shoulder) missed his third straight game and is day-to-day.
Cardinals: 2B Kolten Wong (bruised elbow) pinch hit and flew out after being taken out of Saturday night's game. RHP Carlos Martinez (right shoulder strain) and IF Yairo Munoz (right wrist sprain) were scheduled to play Sunday at Double-A Springfield and could join the team in Los Angeles.
Milwaukee: RHP Chase Anderson (7-7, 3.97 ERA) will start a three-game series against the visiting Cincinnati Reds and RHP Homer Bailey (1-10, 6.33 ERA) on Monday night. Anderson is 4-1 with a 2.98 ERA in nine career starts against the Reds.
Cardinals: LHP Austin Gomber (3-0, 2.89 ERA) will kick off a six-game road trip Monday night against the Los Angeles Dodgers and LHP Alex Wood (7-7, 3.51 ERA). Gomber has won his last two starts and has an 11-inning scoreless streak.
More AP MLB: https://apnews.com/tag/MLB and https://twitter.com/AP-Sports
Phillies, outfielder Andrew McCutchen agree to deal
The Phillies have agreed to a contract with outfielder Andrew McCutchen, according to reports.
White Sox acquire right-hander Ivan Nova from Pirates
The White Sox have acquired right-hander Ivan Nova from the Pirates.
Ottavino: I'd 'strike out Babe Ruth every time'
Adam Ottavino says that he would strike out Babe Ruth "every time" because the game has changed so much.
Jayson Stark wins Baseball Hall of Fame's Spink Award
Jayson Stark, a former writer for ESPN and The Philadelphia Inquirer who is currently with The Athletic, has won the J.G. Taylor Spink Award for baseball writing and will be honored during the Hall of Fame's induction weekend July 19-22.
Mets eye another jackpot in J.T. Realmuto
So far, new GM Brodie Van Wagenen has shown a penchant for playing high-stakes poker. No surprise he's all-in on the best available catcher in Vegas.
2018 MLB winter meetings trade and free-agency buzz
The MLB winter meetings are going strong in Las Vegas and rumors are swirling across baseball. Here is what we're hearing today.