Miguel Sano hit a walkoff, two-run homer to win the game Monday.

And it only took 5 hours and 14 minutes.

The marathon game was the longest in Major League Baseball this season and ended with the Twins beating Cincinnati 7-5 in 12 innings to extend their winning streak to five games.

The two teams have a 12:10 p.m. start looming Tuesday to end the two-game series. The previous longest game this year was 308 minutes between Houston and San Diego on May 29; that one also went 12 innings.

"You reach the point where you go from good to, like, maybe a little tired. Then you get that weird energy when you start doing and saying weird stuff that you don't normally think about or talk about," Twins manager Rocco Baldelli said. "… Our guys were locked in. Our at-bats, our attentiveness on the field, the way our guys pitched coming out of the bullpen."

Twins 7, Cincinnati 5, 12 innings

Victory came at a cost.

Center fielder Byron Buxton, playing in only his third game back from a lengthy stay on the injured list because of a hip strain, left the game after the fifth inning after being hit with a pitch. X-rays were taken during the game, and Baldelli said postgame that Buxton had a boxer's fracture — a break at the neck of the pinkie finger — and will miss a significant amount of time. A roster move, likely the addition of Gilberto Celestino, will come Tuesday morning.

The Twins improved to 31-41, still double-digit games back in the American League Central, in front of an announced crowd of 17,530 at Target Field.

After taking an early 3-0 lead Monday, the Twins failed to capitalize on three bases-loaded, two-out scenarios.

The teams were tied 3-3 when extra innings began. Nick Castellanos hit an RBI single off Jorge Alcala to score the free runner at second base. Castellanos advanced to third on a single and scored on Eugenio Suarez's sacrifice fly.

Luis Arraez hit an RBI double to the left-center wall in the bottom of the 10th, scoring Andrelton Simmons, who had started on second, and putting the Twins within a run. Sano hit a ground-ball single to left field to advance Arraez, and Trevor Larnach earned some redemption after whiffing on two bases-loaded situations early in the game with a sacrifice fly to level the score again at 5-5.

The Twins went to the 11th inning for the first time this season. And then to the 12th, also for the first time. Matt Shoemaker, demoted to the bullpen from the starting rotation, pitched a one-two-three inning in the 11th and continued that form into the 12th, again not allowing a hit and pitching out of a bases-loaded situation from the free runner and two walks, one intentional.

Arraez advanced Simmons on a ground ball to start the bottom of the 12th before Sano's big moment. Sano wasn't even supposed to play this game, only coming in as a pinch runner for pinch hitter Josh Donaldson in the eighth inning.

The Twins initially took a three-run lead in the third inning, starting with Nelson Cruz's leadoff homer.

The Twins then put the next four runners on base. Max Kepler walked before Jorge Polanco's line-drive single put him on third. Alex Kirilloff sent him home off another liner before Ryan Jeffers walked to load the bases. Arraez's sacrifice fly scored Polanco, with Buxton's infield single filling them again. Larnach struck out to keep the score 3-0.

Cincinnati tied the game in the fourth inning, scoring three runs off starter J.A. Happ from back-to-back homers by Suarez and Aristides Aquino.

The Twins' vibes had taken a hit in the fourth inning, when Buxton took a pitch off the back of his left hand. He stayed in the game but appeared to wince a bit catching a fly ball in the fifth inning. Nick Gordon replaced him in center field to start the sixth.