Despite everything that went wrong Saturday — failing to get key hits, to put away batters or run the bases correctly — the Twins still had their shot in the ninth inning.

Joe Mauer drove in Byron Buxton with a single, and Brian Dozier represented the potential tying run as he dug in against Rays closer Alex Colome.

“I got two good pitches to hit,” Dozier said.

He fouled both off. Colome then got Dozier to swing and miss his slider for the final out as Tampa Bay held off the Twins 7-4 in a game that saw a 70-minute rain delay during the sixth inning.

It was the second consecutive night that Dozier made the final out of a game; he popped out against Colome on Friday at the end of a 4-2 loss to the Rays.

“I think it would be a lot better to be playing from ahead in those situations,” Twins manager Paul Molitor said. “I think it makes you think about how you let a couple leads early on slip away when you have to play catch-up like that.”

The series is a matchup between the teams with the two worst records in the American League, and now the Twins need to win ­Sunday to avoid losing three of four to the Rays.

As they did Friday, the Twins again offered many examples of why they are 16-39.

The Twins actually held a 3-1 lead through three innings on Saturday. Eduardo Nunez scored on Dozier’s groundout in the first inning. They added two more runs in the third on a sacrifice fly by Mauer and an RBI double by Dozier. The only mistake righthander Ervin Santana made to that point was giving up a solo home run to Hank Conger in the third.

But Steven Souza Jr. drilled a 2-2 slider for a three-run homer in the fourth to give the Rays a 4-3 lead.

“I tried to bury that pitch and it didn’t do anything,” said Santana, who fell to 1-5 on the season.

In the fifth inning, Evan Longoria homered — his third home run in as many games in this series — to put Tampa Bay ahead 5-3.

Meanwhile, the Twins had Rays righthander Matt Andriese (4-0) on the ropes, running his pitch count to a whopping 92 through five innings. They were 4-for-12 with runners in scoring position at that time, which is solid, but Nunez hit into a double play with the bases loaded to end the fourth. Dozier reached second on a throwing error in the fifth but was stranded there.

The Twins entered batting .214 with runners in scoring position and played to that weakness in situations in which they could have turned the game around.

“It’s just a tough way to play when you are hoping for that comeback late,” Molitor said.

Logan Morrison made it 7-3 with a two-run homer in the seventh off Michael Tonkin — off another two-strike pitch. That gave opponents 78 home runs off Twins pitching this season, second-most in baseball.

Trevor Plouffe rolled a single down the right-field line with one out in the eighth, but he was thrown out trying to advance to second, killing an opportunity before it even started.

That’s the way it’s been going for the Twins lately. They can’t finish off hitters when they need to and they can’t sustain rallies.

“We did come across with a couple hits with runners in scoring position but it means you still left somebody out there,” Dozier said. “You still have to get those big hits. Souza got the big hit for them, and we didn’t get it.”