The Indians are the hottest team in baseball with one of the best bullpens in the game, and they had a lead in the eighth inning.

That did not matter to the Twins.

“The momentum can shift, just like that,” Byron Buxton said. “With just one hit.”

Brian Dozier turned out to be right man at the right time with the right swing.

Dozier launched Bryan Shaw’s cut fastball over the right field wall for a three-run homer in the eighth inning to bring the Twins back from a two-run deficit. Buxton added an RBI single in the ninth, and the Twins toppled the Indians 8-6 at Progressive Field for their fifth consecutive victory.

They were ready to party if they had clinched a wild-card berth, so they retreated to the clubhouse to watch the end of the White Sox-Angels game in Chicago. Alas, the Angels won 9-3. So the Twins’ magic number to clinch the second wild-card spot is down to one. A victory over Cleveland on Wednesday — or an Angels loss to Chicago — and the Twins are back to the postseason for the first time since 2010.

“We still have work to do,” Dozier said. “Let’s not get ahead of ourselves.”

Dozier’s homer slowed down Cleveland’s 29-2 rampage through the league heading into Tuesday. And the Indians bullpen was 87-4 when leading after seven innings.

The Twins won a game in which starting righthander Bartolo Colon left after one inning because of illness, leading manager Paul Molitor to use a club-record 10 pitchers in a nine-inning game. It also was a relief after the Twins were 1-for-14 with runners in scoring position before Dozier faced Shaw in the eighth.

With five games left to play, the Twins already have improved by 24 victories from last season, the biggest turnaround in club history. Part of the reason is the young core of hitters continuing to produce. In addition to Buxton’s insurance run, Eddie Rosario was 4-for-5 with a home run and three RBI.

“Just because we are close to the playoffs, we didn’t go out there and change anything or try to be something we’re not,” Buxton said. “We stayed within ourselves.”

Jason Castro singled with one out in the eighth and was replaced by pinch runner Niko Goodrum. Robbie Grossman singled, with Goodrum advancing to third, and Zack Granite pinch ran for Grossman. Dozier was 3-for-23 against Shaw, but knew one thing: He was getting a cut fastball.

The 0-1 pitch was 96 miles per hour, but broke down and over the middle of the plate. Dozier swatted it out to right, then threw his right fist into the air as he rounded first base.

“That was probably as explosive as our dugout has been all year, when that ball cleared the right field wall,” Molitor said. “That was quite a moment.”

The Twins scored two runs in both the first and third innings, only for the Indians to tie the score in the bottom of each inning. Then the Twins began leaving runners in scoring position. Francisco Lindor gave Cleveland a 5-4 with a sacrifice fly in the sixth, and Edwin Encarnacion added a solo homer in the seventh off Ryan Pressly to make it 6-4.

But those runs only set up the Twins’ 38th come-from-behind victory, putting them one game away from a celebration.

“The magic number is one,” Dozier said. “We control our own destiny. We can win [Wednesday]. And then there will be a party.

“I probably won’t see you guys for a day and a half.”