One minute, the Twins appeared headed to a win on the strength of a very good start from Michael Pineda — perhaps his last in a Twins’ uniform — and a pair of home runs from Brent Rooker and Josh Donaldson.

The next, they were watching all-star reliever Taylor Rogers badly misfire in the ninth and then look down at his left hand before quickly walking off the mound with assistant athletic trainer Masa Abe. He was later diagnosed with a left middle finger sprain.

And a few minutes after that, after he hastily warmed up on the Target Field mound, they were watching Alexander Colomé try, but fail, to secure the save.

Though things unraveled quickly for the Twins, they charged back to beat the Tigers 6-5 in extras in a wild game that saw pitcher Kenta Maeda score the game-winning run on Max Kepler’s walk-off hit.

After failing to capitalize when Detroit all-star Gregory Soto walked the bases loaded in the ninth inning, reliever Caleb Thielbar came in and held the Tigers in place in the 10th. The Twins had forfeited the designated hitter earlier in the game and with Thielbar’s spot in the lineup due up, they sent Maeda out to run.

Newsletter signup for email alerts

Minutes later, he was coming home for the game-winning run.

The late-inning action came after another solid start from Pineda.

If this was it, if this was the last time Pineda took the Target Field mound wearing a Twins uniform, the big right-hander sure did his part to show how he could be useful to a contender.

The Twins’ selloff began last week, when designated Nelson Cruz was shipped to Tampa Bay. The size and scope of their selloff is yet to be seen, something that will unfold over the course of the next few days ahead of the July 30 trade deadline.

Pineda, whose contract runs up at the end of the season, seems like a likely candidate to go, though the starter has said multiple times that he tries not to think about the situation, which is out of his control.

Any team that were to trade for the starter would get a guy who has been relatively consistent over the past three seasons. He was again on Monday.

After allowing a double to the first batter of the game, former Twins prospect Akil Baddoo, Pineda struck out the next three batters he faced in the first inning. Beginning in the third inning, he retired 11 batters, a stretch that took him into the sixth inning.

The only blip he had on the night came with a pair of outs in that frame, when he allowed a single to Jonathan Schoop and before serving up the 495th home run of Miguel Cabrera’s career.

But he left in line for the win after Rooker blasted his second home run to the third deck in left field in as many days in the sixth inning and Donaldson hit a two-run shot to center later in the inning, giving the Twins the lead at the time.