MILWAUKEE -- Struggling to get his 18th win, Chris Capuano found a way to get his most important out.
Facing Mark Grudzielanek with two runners on and two outs in the sixth inning, he induced an inning-ending groundout that preserved a tie.
Lyle Overbay hit a tie-breaking double in the bottom half, and the Milwaukee Brewers sent Chris Carpenter to his first loss in more than three months, beating the St. Louis Cardinals 9-6 Friday night.
"I didn't pitch very well tonight, but my teammates really picked me up," Capuano said. "I can't feel bad because we won. But I know I have to pitch better next time out."
Capuano (18-10) won despite a career-high eight walks. He allowed six runs and six hits in six innings, becoming the first Brewers pitcher with 18 victories since Teddy Higuera in 1987.
Before Capuano pitched to Grudzielanek, Brewers manager Ned Yost went to the mound to give Capuano a pep talk.
"I told him I didn't want to take him out of the game," Yost said. "I wanted to give him an opportunity to get through the inning so we could score some runs for him and get him his 18th win. I told him to get after him and be aggressive."
Yost said that if Capuano wins Wednesday against Cincinnati, he would start the Brewers' final game of the season on three days' rest. The last Brewers pitcher to win 20 games was Higuera in 1986.
"I'm not even thinking about it," Capuano said. "I just have to go out and throw strikes against Cincinnati."
Matt Wise followed with two scoreless innings, and Derrick Turnbow finished for his 34th save in 38 chances.
Bill Hall had four hits and two RBIs and Overbay hit two doubles and drove in two runs as the Brewers overcame a four-run deficit.
Carpenter (21-5) gave up a season-high nine runs and 12 hits in 5 1/3 innings -- the most runs off him since he allowed nine at Baltimore on July 1, 2000. He had won 13 straight decisions since losing to Boston on June 8.
"I made some bad pitches and even the good ones got hit," Carpenter said. "No matter what you say about it, it's unacceptable."
St. Louis had won nine straight at Milwaukee since losing on Sept. 21 last year.
So Taguchi's sacrifice fly and a bases-loaded walk to Grudzielanek -- Capuano's third walk of the inning -- put St. Louis ahead 2-0 in the third, but Capuano's two-run single tied the score in the fourth.
St. Louis went ahead 6-2 in the fifth on Grudzielanek's two-run single and Hector Luna's two-run double, but Milwaukee tied the score in the bottom half on Carlos Lee's sacrifice fly, Geoff Jenkins' RBI double, Hall's run-scoring triple and Weeks' RBI grounder.
Notes: Miller left after the sixth inning with soreness in a knee. ... Capuano has nine RBIs this season, a Brewers record for a pitcher. It was his third two-RBI game this season.