Getting your Trinity Audio player ready...

The Chicago White Sox were on the verge of one of their biggest wins of the season.

Instead, they suffered one of their most crushing defeats.

Jose Ramirez hit a game-ending three-run home run off Jose Ruiz in the 10th inning, giving the Indians a 5-3 victory against the Sox on Tuesday at Progressive Field in Cleveland.

The Sox scored twice in the top of the 10th, but the Indians answered with four in the bottom of the inning as the Sox (34-21) lost for the fourth time in five games.

“Tonight was a tough one, let’s face it,” Sox manager Rick Renteria said. “It was a good ballgame. We took the lead. It seemed like everything was lining up. It just didn’t work out.”

.embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; } .embed-container iframe, .embed-container object, .embed-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

Adam Engel drove in James McCann with a triple to give the Sox a 2-1 lead in the 10th. Nick Madrigal followed with an RBI single, making it 3-1.

Sox closer Alex Colome pitched a perfect ninth and was scheduled to come out for the 10th. But he couldn’t return because of back spasms.

“In talking to him in the dugout, he said he doesn’t think it’s going to be anything big, but he didn’t feel good,” Renteria said. “Talked to our trainers and they said there shouldn’t be any concern, but we’ll see where he’s at (Wednesday).”

The Sox turned to Matt Foster, who retired the first two batters. Francisco Lindor knocked in a run with a two-out double to center. Luis Robert jumped at the wall but couldn’t make the catch.

Foster walked Cesar Hernandez, and the Sox called on Ruiz. Ramirez ended the game with his 17th homer of the season on a 2-2 fastball.

“I think (bench coach) Joe (McEwing) was probably just thinking of going with power (with Ruiz),” said Renteria, who was ejected in the top of the 10th. “(Ruiz) got ahead of him. He had just finished throwing a slider down underneath. He went back to a fastball and (Ramirez) ended up obviously catching it well.”

The Sox lead in the American League Central shrank to a half-game over the Minnesota Twins (34-22), who beat the Detroit Tigers 5-4 in 10 innings. The Indians (31-24) are three games back.

The magic number for the Sox to clinch the division remains four with five games to play. The Indians joined the Sox and Twins in clinching a playoff berth.

Sox starter Reynaldo Lopez had his strongest outing since returning from the Schaumburg training facility. He allowed one run on three hits with three strikeouts and two walks in five innings.

The Sox optioned Lopez to Schaumburg on Sept. 3, and he returned Sept. 10. His ERA has gone from 8.38 to 4.68 in three starts since returning.

“I feel good, I felt like I threw the ball very well (Tuesday) and I gave the team a chance to compete,” Lopez said through an interpreter. “Unfortunately, things didn’t go well at the end, but that’s baseball.”

Lopez surrendered a solo home run to Hernandez in the first.

Jose Abreu tied the score at 1 in the sixth with a solo homer to right-center, his 19th of the season, off Adam Plutko. Abreu leads the AL with 56 RBIs.

Codi Heuer struck out two in two innings, and Garrett Crochet had one strikeout in the eighth to keep the game tied.

The Sox had runners on the corners with two outs in the ninth, but Nick Wittgren struck out McCann to end the inning.

The top of the 10th featured two ejections, as Tim Anderson and Renteria were tossed after plate umpire Angel Hernandez ruled Luis Robert went too far while trying to check his swing on a third strike.

“He heard Timmy talking,” Renteria said. “He was already into the game and continued to, I guess, keep his ears open to whatever was going on in the dugout as opposed to just staying on to the field. He ejected (Anderson), which obviously put us in a little bit of a bind there. I had to go out there and talk to him a little bit.”

The Sox quickly recovered with the back-to-back hits by Engel and Madrigal.

But Ramirez showed why he’s in the MVP conversation with Abreu and Anderson, giving the Indians their sixth win in eight meetings against the Sox this season.

“Days like this or games like this can’t hold us back,” Lopez said. “We have to keep moving forward and keep the same mentality that we’ve had.”