The Twins’ playoff hopes may be on life support, but they did show one thing on Thursday: They’re not going down without a fight.

To realistically keep their playoff chances alive, the Twins were going to need to sweep the Miami Marlins — or at least win two out of three — and get some outside help.

They got no outside help — the Tigers and Royals, whom they are chasing in the wild-card race, both completed sweeps — and though they did battle back twice late in Thursday’s game, they ended up falling 8-6 in a 13-inning heartbreaker at Target Field.

Otto Lopez’s double off Scott Blewett put Miami up for good, and Griffin Conine added a two-run single off Justin Topa, helping the Marlins pull away after a dramatic few innings before that.

In the ninth, the Twins stranded Byron Buxton, whose speed after an 11-pitch at-bat helped placed him on second with just one out. An inning later, the teams traded run-scoring sacrifice flies. The Twins could have had more, but center fielder Derek Hill made a great falling catch to prevent Willi Castro’s sacrifice fly from becoming something more.

Neither team scored in the 11th with the Marlins using a five-man infield to cut down a Twins runner trying to score at home. In the next inning, Ryan Jeffers bunted into a double play as Carlos Santana was caught off second, helping squash a Twins opportunity to walk it off.

The dramatic late innings were set up by an eighth-inning rally that kept the Twins alive. It was started by Royce Lewis, who drew a one-out walk. Santana followed, just missing a two-run, game-tying home run and instead settling for a long single off the limestone overhang in right field. Brooks Lee came through with the biggest hit of his career, hitting a double off the wall in right field to bring both home and tie up the game.

But though the Twins forced their way back into Thursday night’s game, overcoming a four-run deficit, they never could get themselves a lead.

So, it all comes down to one final weekend.

Both the Tigers and Royals have a magic number of one, meaning the Twins would need to win out and have one of those two teams lose their remaining three games.

The Twins host the playoff-bound Baltimore Orioles, the Tigers get the historically bad White Sox and the Royals play the Braves, who themselves are fighting for a playoff spot.

Minnesota, which trails both teams by three games with three games to go, holds the tiebreaker over both, which is why they have yet to be mathematically eliminated. That could happen as early as Friday.