ST. LOUIS (AP) -- Joe Kelly's impressive run came to an end Thursday night.
Kelly, who won his previous five starts, struggled in a 5-3 loss to the Milwaukee Brewers that dropped the St. Louis Cardinals into a first-place tie in the NL Central with the Pittsburgh Pirates, who beat the Chicago Cubs 3-1.
St. Louis had won the last eight times Kelly started on the mound. His last loss came on June 5. The right-hander entered 8-1 with a 2.06 ERA in his past 11 starts.
Kelly (8-4) allowed four runs, three earned, and seven hits in five innings. It wasn't a bad outing, just not up to his standards of the last two months.
"It wasn't too good all around," Kelly said. "Early in the game, they were swinging early at the fastball and getting some hits. I could have made some better pitches. They didn't hit the ball extremely hard."
Milwaukee rookie Tyler Thornburg threw six solid innings and Sean Halton homered to lead the Brewers, who snapped the Cardinals' five-game winning streak. St. Louis and Pittsburgh are both 85-61 with 16 games left.
The Brewers had four hits through the first two innings and capitalized on two errors by Kelly in the second to grab a 2-0 lead. They made it 4-0 on Halton's home run in the fourth.
"Joe's been so good for us and he really battled to stay in there," Cardinals manager Mike Matheny said. "It really could have gotten out of control."
The Brewers broke a three-game losing streak against St. Louis and beat the Cardinals for only the fourth time 16 meetings this season.
Thornburg kept the Cardinals off the scoreboard in five of his six innings. He enjoyed playing the spoiler role.
"You always want to try and make it as tough for those teams who have something to play for," he said.
The Brewers used some timely hitting to salvage the final game of the three-game series.
"It's important to beat these guys. They've been taking it to us pretty good," manager Ron Roenicke said. "We played a good game today. There were a lot of good things that happened."
The Cardinals are 5-1 on their nine-game homestand.
Thornburg (2-1), making his eighth career start, gave up two runs and three hits. He spent most of the season with Triple-A Nashville, going 0-9 with a 5.79 ERA in 15 starts.
Thornburg struck out six and walked two. He has allowed two runs or fewer and gone six innings in all five major league starts this season.
Jim Henderson earned his 25th save in 29 opportunities.
St. Louis outfielder Carlos Beltran was impressed with Thornburg.
"The first couple of at-bats you're kind of like wondering, watching what he's trying to do," Beltran said. "We just couldn't do anything against him."
Halton, who had three RBIs, hit a two-run homer off Kelly in the fourth to put the Brewers up 4-0. A rookie starting his 15th game, Halton also had a run-scoring single in the second.
Like Thornburg, Halton loves the spoiler role.
"We're in a (pennant) race all right, a race to knock someone else out," he said.
Matt Adams hit a two-out solo homer in the ninth, his 13th of the season.
The Brewers scored single runs in each of the first two innings. Scooter Gennett and Jonathan Lucroy singled in the first, and Gennett came around on a groundout by Aramis Ramirez.
The Cardinals pulled to 4-2 in the fourth on a run-scoring double by Matt Holliday and a sacrifice fly by David Freese. They also put two on with one out in the sixth, but Thornburg retired Beltran and Freese to end the threat.
"We just had a lot of things not really going the way we wanted them to," Matheny said. "We hit a few balls hard, but (Thornburg) threw a good game against us."
Norichika Aoki tripled in Yuniesky Betancourt in the ninth.
NOTES: All three games in the series lasted 3 hours, 2 minutes. ... St. Louis RHP Trevor Rosenthal missed the game. His wife, Lindsey, was in labor awaiting their first child. ... Cardinals C Yadier Molina missed his second successive game due to an illness to his mother, Gladys. General manager John Mozeliak said Molina could be back Friday. ... St. Louis 1B Allen Craig is making progress with his injured left foot. "We're still optimistic he'll play again," Mozeliak said. "He's feeling a lot better. It's one of those things where you're just going to have to let some time progress." Craig sustained a left mid-foot strain on Sept. 4. ... St. Louis ends its homestand with three games against Seattle beginning Friday. Cardinals RHP Adam Wainwright (16-9, 3.03) faces Hisashi Iwakuma (12-6, 2.97).