CHICAGO — The Chicago Cubs are going to the final day of the season with a shot at the NL Central championship.

Whether they take it outright, blow their big opportunity or have to play a tiebreaker remains unclear.

So much uncertainty for a team hoping for another long post-season.

The Cubs wasted a solid performance by Cole Hamels in a 2-1 loss to Miles Mikolas and the St. Louis Cardinals on Saturday, making for a muddled NL playoff picture.

Hamels and company dropped into a tie with Milwaukee for the division lead when the Brewers rallied for a 6-5 victory over Detroit.

The Cardinals kept alive their chance for a wild card, but were eliminated by the Los Angeles Dodgers' 10-6 victory at San Francisco.

The Cubs have locked up a playoff spot, but that's all they know at this point.

"It's a special moment to be able to see that type of intensity that comes with meaningful games and that sort of playoff atmosphere," Hamels said before Milwaukee's victory. "It's a little bit better when you win. ... (To win the World Series), you're gonna have to play some really tough teams at some tough moments, high intensity, high stakes."

The Cubs would have wrapped up their third straight division championship with a victory and a loss by the Brewers to Detroit on Saturday night. Chicago and Milwaukee would meet in a tiebreaker at Wrigley Field on Monday if they wind up with identical records, with the loser then playing in a wild-card game at home on Tuesday.

"There's nothing to lament with our guys," said Cubs manager Joe Maddon, whose team led the division by five games on Sept. 2. "They've been playing very well for a long period of time. Our route's been a little different than everybody else. We'll come back ready to play (Sunday) and see how it all falls."

Mikolas (18-4) allowed one unearned run and five hits in his fifth straight win. He struck out six, walked none and improved to 10-0 in 16 road starts.

"Credit to him, he shows up prepared, is even keeled and goes out there and executes and pitches," Cardinals manager Mike Shildt said. "Just a fantastic job today."

Carlos Martinez worked a perfect ninth for his fifth save in five chances.

Matt Carpenter and Paul DeJong each had RBI singles. Carpenter also scored a run. And the Cardinals got back to winning after matching a season high with four straight losses.

"We did everything we could today," Mikolas said.

Hamels (4-3) was a tough-luck loser, dropping his third straight start after going 4-0 in his first nine outings following a trade from Texas. The left-hander gave up two runs, one earned, and three hits in seven innings. He struck out eight , walked two and hit two batters.

Kris Bryant, Anthony Rizzo and Daniel Murphy hit fly balls to the warning track. But the Cubs got shut out the rest of the way after taking a 1-0 lead in the first.

GRABBING THE LEAD

Ben Zobrist singled and scored when second baseman Yairo Munoz let Javier Baez's pop fly deflect off his glove as he tried to make an over-the-shoulder basket catch in shallow right field.

It was the Cardinals' major league-leading 132nd error.

Carpenter played a role in both runs as St. Louis scored in the fourth and fifth to go up 2-1.

He reached on interference by catcher Victor Caratini and scored on DeJong's single in the fourth. Harrison Bader got hit by a pitch leading off the fifth and scored on a single by Carpenter, who got thrown out by Caratini trying to take second on the play.

DOMINATING

Mikolas' 18 wins are the most by a Cardinals pitcher since Adam Wainwright's 20 in 2014. ... Hamels has a 2.36 ERA in 12 starts for Chicago.

TRAINER'S ROOM

Cardinals: RHP Bud Norris (tight left hamstring) was unavailable, Shildt said. Norris faced two batters in the seventh inning Friday before leaving the game.

Cubs: RHP Pedro Strop (strained left hamstring) said he does not expect to pitch again until the playoffs. Injured running to first on a double-play grounder at Washington on Sept. 13, he still experiences some discomfort on the landing throwing off the mound. "I expect to feel it a little bit," Strop said. "But it was nothing major, nothing like I reinjured it. I knew it was gonna hurt at some point. I'm not afraid of it."

UP NEXT

Cardinals: RHP Jack Flaherty (8-8, 3.16 ERA) pitches in the regular-season finale on Sunday. He is 0-2 with a 4.50 ERA in his past five starts.

Cubs: LHP Mike Montgomery (5-6, 3.99 ERA) tries to close out the regular season on a winning note after getting tagged for five runs in four innings in a loss to Pittsburgh on Tuesday.

___

More AP baseball: https://apnews.com/tag/MLBbaseball and https://twitter.com/AP_Sports