Wainwright posted his 19th win, pitching a shutout Wednesday night as the Cardinals beat the Milwaukee Brewers 2-0 to hold their 2 1/2-game edge in the NL Central.
It was his fourth consecutive win after a dreadful August during which he lost four of six starts and had a 5.17 ERA.
"For a long while I wasn't very good," he said. "It was good to be back making pitches when I need to."
Wainwright (19-9) worked around seven hits and tied for the major league lead in wins and shutouts.
St. Louis has won four of five and kept its advantage over second-place Pittsburgh. Milwaukee dropped 2 1/2 games behind the Pirates for the second NL wild-card spot.
It was the second time in less than two weeks Wainwright went the distance against Milwaukee. He gave up one run to the Brewers in a 9-1 victory on Sept. 7 at Miller Park.
"I would say that was an impressive pitching performance," St. Louis manager Mike Matheny said. "He had everything and then when you watch the ninth and see 95 pop up there and you realize that this guy still had a lot in the tank."
Mike Fiers (6-3) held the Cardinals hitless until Wainwright singled up the middle with two outs in the sixth. It was Fiers' first start since beaning Miami's Giancarlo Stanton last week, ending his season.
Fiers said he needed to forget about hitting Stanton in order to help his team.
"Obviously, everyone knows what happened," he said. "But we have games ahead of us, we have games to win, important games and this was an important one."
Wainwright and Dodgers ace Clayton Kershaw are atop the majors in wins.
This was the Cardinals' 21st shutout of the season, their most since 1968 when Bob Gibson and the rest of the staff had 30.
Fiers gave up one earned run and three hits in seven innings.
"Wainwright gave up more hits but he was able to pitch out of jams," he said. "Pretty much the only jam I got into, they made the hits when they had to and they needed to. I needed to be better in that one inning, I wasn't, so they capitalize."
The Cardinals broke through in the seventh. After hit a drive that went about 3 feet wide of the foul pole, Matt Holliday walked with one out and reached third on Matt Adams' single, continuing home when Gold Glove center fielder Carlos Gomez slipped and mishandled the hit for an error.
It appeared as if Holliday was about to stop at third before Gomez stumbled. Once third base coach Jose Oquendo saw the opening, he waved Holliday home to score the Cardinals' first run in 17 innings.
"I don't think that surprised anybody, either," Matheny said. "He was able to turn it back up. When we're not getting things going, we've got to try and make things happen."
Jhonny Peralta singled home Adams.
Cardinals: RHP Michael Wacha, whose last start was skipped after he struggled in his return from a shoulder injury, is scheduled to start Saturday against Cincinnati. In two starts this month, he pitched seven innings and had a 7.71 ERA. Wacha threw his third bullpen session since his last start on Wednesday and did enough to convince Matheny he was ready.
Brewers: Kyle Lohse (12-9, 3.81 ERA) pitches Thursday night against the Cardinals. He has lost five of his past six decisions, including twice to St. Louis. In those two losses, in which he lasted four innings both times, Lohse gave up 14 runs on 13 hits, including four homers.
Cardinals: Shelby Miller (10-9, 3.75) has given up one earned run over 20 innings in three starts this month. He has won his past two decisions, following four consecutive no decisions. Miller won both of his starts against Milwaukee this season, giving up four runs in 12 innings.
Link to box score: St. Louis (84-68) 2, Milwaukee (79-73) 0
Join the pre-game, in-game and post-game discussion about each contest at The Cardinal Nation message board.