CLEVELAND -- The Minnesota Twins got even with Jose Ramirez without targeting him. Cleveland's second baseman took care of any retaliation all by himself.
Ramirez's costly throwing error helped Minnesota score two unearned runs in the ninth inning, giving the Twins a 4-2 victory that moved them a little closer to an AL wild-card spot.
Pinch-runner Eduard Nunez scored from third base on a wild pitch and Torii Hunter hit a sacrifice fly off Cody Allen (2-5) in the ninth as the Twins pulled within one game of idle Houston for the second wild-card berth with three games left.
Facing a crushing loss, the Twins scored a run in the eighth to tie it and then two in the ninth with a major assist from Ramirez, who had angered Minnesota manager Paul Molitor and his team on Wednesday night when he flipped his bat toward their dugout after hitting a three-run homer.
"He committed an error and went 0 for 4," Hunter said. "He might have suffered enough. He's young. You got to know the game. What he did last night was wrong, but I'm pretty sure he understands that."
Trevor Plouffe reached on Ramirez's rushed throw that bounced in the dirt with one out in the ninth. Nunez, running for Plouffe, then raced to third on Eddie Rosario's single to right before Allen bounced a 2-2 pitch to Hunter in the dirt. Hunter followed with a fly to deep right, bringing in Rosario.
Glenn Perkins (3-5) pitched a 1-2-3 eighth and Kevin Jepsen worked the ninth for 15th save.
Down 2-1 and in danger of losing a game they couldn't afford to, the Twins tied in the eighth against reliever Bryan Shaw on Eduardo Escobar's hit-and-run RBI double.
Hunter likes the Twins' odds as they enter the final weekend with a chance to extend their season.
"I love our chances," Hunter said. "Being a game back with three to go, all we wanted was a chance to get into the postseason. We're giving ourselves a pretty good chance right now."
Roberto Perez's two-run homer off Twins rookie Tyler Duffey in the seventh inning had given Cleveland a 2-1 lead.
Duffey took a four-hit shutout into the seventh when Abraham Almonte singled with one out before Perez drove a 3-1 pitch over the wall in center for his seventh homer. As the shot cleared the wall, Twins second baseman Brian Dozier put his hands over his head in shock and disappointment.
But the Twins weren't done and Ramirez, who had put a target on himself with his behavior, made the crucial error that ignited their rally.
"The game can be humbling," said Indians manager Terry Francona, who was not pleased with Ramirez's showboating. "I'm sure they took a little extra satisfaction out of that."
Cleveland's Trevor Bauer, making his first start since Sept. 13, allowed just one run and two hits -- two doubles in the fourth -- and got a no-decision. The quirky right-hander, who flew a drone above the field before the game, was demoted to the bullpen last month but made only one appearance in relief.
Molitor hinted before the game that there would be no immediate retaliation by saying, "We're going to prioritize winning."
And that's what the Twins did as Ramirez didn't even see an inside pitch while going hitless in four at-bats.
"We talked about keeping our focus and not being distracted today," Molitor said. "What happened, happened. I don't want to get into any kind of justice being served or baseball gods. It just worked out that they made a misplay and we capitalized on it."
Dozier struck out leading off the first, giving him a club record 146 strikeouts this season. Dozier broke the previous mark set by Bobby Darwin (145) in 1972. Hall of Famer Harmon Killebrew struck out 142 times in 1962.
The Twins went 5-2 on a road trip through Detroit and Cleveland to keep their playoff chances alive.
Twins: RHP Ervin Santana opens a three-game series against Kansas City, which clinched the AL Central title earlier this week and is trying to secure home-field advantage throughout the playoffs. Santana, who can't pitch in the postseason because of a drug suspension, has won five straight starts.
Indians: RHP Josh Tomlin makes his final start this season in the series opener against the Boston Red Sox. Tomlin lasted a season-low 3 2-2 innings last week against Kansas City.