See more of the story

The scoreboard is right there over his right shoulder. So, yes, Max Kepler is going to take a peek every now and then. And the temptation is greater when your team is in a pennant race.

For the Twins, they were focused on the pesky Detroit Tigers, who somehow have punched above their weight class whenever they see a Minnesota uniform this season. But about 750 miles away, Cleveland was headed into extra innings against the White Sox, and losing.

In the bottom of the 10th inning, Jose Ramirez belted a three-run walkoff homer, meaning the onus was on the Twins to beat Detroit and tighten the race for the AL Central title. And Kepler showed he can check out the scoreboard and still do his job, as he tied the score in the eighth inning with a home run, then won it in the 10th with a run-scoring single as the Twins walked off the Tigers 5-4 in 10 innings.

The Twins moved to within a half-game of the White Sox for the AL Central Division lead while staying 1½ games in front of the Yankees in the battle to play host to the entire best-of-three first round of the playoffs. But that won't even matter if the Twins can run down Chicago over the final days of the regular season .

"I did see that they won that game," Kepler said. "Yeah, it would be cool if we came out on top, but either way we're go into the playoffs strong and I think with the same attitude regardless of whether we come in second or first."

The victory came on a day in which the Twins' postseason rotation became known — Kenta Maeda will pitch Game 1 of the wild-card series that starts Tuesday, followed by Jose Berrios in Game 2 and Michael Pineda in Game 3.

Who they will play is still up in the air. And the Tigers were making that process tougher by battling the Twins into the late innings Tuesday. The Twins are just 5-4 against Detroit after going 14-5 against them last year.

MLB standings | Scoreboard

"We had to really dig a little bit to get done what needed to get done tonight," Twins manager Rocco Baldelli said. "Our guys kept fighting and kept going and you never know how those games are going to end, but we found a way to get it done. It was a good night."

Byron Buxton put the Twins up with a leadoff homer, but Detroit tied the score the fourth. Mitch Garver homered to give the Twins a 2-1 lead in the bottom of the inning, but Detroit scored a run off Tyler Duffey in both the sixth and seventh innings to take a 3-2 lead.

The Twins kept battling. They turned a 6-2-5 double play with the bases loaded in the fourth — started by shortstop Ehire Adrianza throwing from his knees to home. Left fielder Eddie Rosario threw out Dez Cameron as he tried to score on a single in the fifth. Then Kepler tied it in the eighth with his ninth homer.

Jeimer Candelario's RBI single off Taylor Rogers gave Detroit a 4-3 lead in the 10th — uh-oh — but Rosario singled in Jake Cave leading off the bottom of the inning, stole second and scored with ease on Kepler's two-out bloop single to left.

Kepler did his postgame interview wearing a robe. Josh Donaldson gifted them to his teammates — complete with names and numbers — and Nelson Cruz wrapped everyone who hit a home run on Tuesday — or had the game-winning hit — in his.

"I got to wear it twice today," Kepler said. "I hope we keep it going because it brought some luck today. But I can't wait to lounge in it in the bubble. I'm going to be doing a lot of that from now on."

Correction: A previous version of this story incorrectly identified Twins pitcher Taylor Rogers.