For a few minutes in the ninth inning Thursday night, the Twins were close to shaking up the American League wild-card race.

But their rally fell just short in a 6-5 loss to Cleveland at Target Field.

After looking lifeless at the plate for eight innings, the Twins erupted with four runs off struggling Cleveland closer Chris Perez, the final two coming on an impressive opposite-field home run by Josmil Pinto to pull the Twins within a run.

Within minutes of Pinto's blast, Texas' Jurickson Profar blasted a walk-off home run to give the Rangers a 6-5 victory over the Angels in Arlington, Texas. Suddenly, if the Twins could score two more in the ninth, Cleveland would have fallen into a tie for the final wild-card spot with Texas.

Cleveland manager Terry Francona pulled Perez for Joe Smith. Trevor Plouffe hit a 12-hopper that hugged the third base line for an infield hit. Chris Colabello walked to put the winning run on first. But pinch ­hitter Oswaldo Arcia watched two strikes from Smith, then swung and missed a third for the final out.

What was left of the announced crowd of 24,929 at least had a reason to cheer late in the game. And televisions across Texas probably were switching to the Twins game to see if ­Minnesota could play the spoiler.

"We liked the finish. We liked the way they got after it," Twins manager Ron Gardenhire said. "We just needed one more hit."

With three games left to play, the Indians hold a one-game lead over Texas for the final wild-card spot.

"It didn't go as planned, but the good news is we won, and that's what we set out to do," Francona said. "That got a little closer than we wanted. Anytime you hear music playing, especially this time of year … but that was a little nerve-racking."

The Indians hope to do what worked for the Athletics on Sunday and the Tigers on Wednesday — beat the Twins to clinch a playoff berth. Gardenhire said his team isn't here to watch others celebrate, but that's what has happened. The Twins season has turned into a march toward oblivion for a team that has lost 90-plus game for the third straight season.

Cleveland has won seven in a row and 12 of its last 14.

Twins lefthander Andrew Albers battled Cleveland well until the fourth, when his balk and an error by Colabello at first keyed the Indians three-run inning. Cleveland got an RBI single by Michael Brantley in the sixth to take a 4-0 lead and Carlos Santana added an RBI double in the seventh to make it 5-0. Ryan Doumit's RBI single in the seventh was the Twins' only run before the eruption in the ninth.

What's in danger now is that the Twins will be unable to win two of the next three games to give Gardenhire his 1,000th career victory, which would be an embarrassing way to end the season.

"We're just trying to win baseball games," Gardenhire said. "Not too worried about it. If it happens it happens. Let other people talk about it. I'm just trying to see us win a ballgame and shake hands. That's all I really care about.''