CLEVELAND (AP) — A long day ended on a high note for the Chicago White Sox.

Alexei Ramirez’s seventh-inning single broke the game’s final tie and led Chicago to a 5-4 win over the Cleveland Indians on Tuesday night, giving the White Sox a split of the day-night doubleheader.

READ MORE: Illinois State Trooper, Woman Found Shot Dead In Car On Southeast Side

Asdrubal Cabrera’s solo home run and six strong innings from Fausto Carmona gave Cleveland a 4-3 win in the first game.

The teams, who were eliminated from the AL Central race last week when Detroit clinched the division, are battling for second place. The Indians lead the White Sox by 1 1/2 games.

Trailing 4-0 in the fifth, Chicago scored a run in the fifth and two runs in both the sixth and seventh.

“It made the day a little bit nicer,” manager Ozzie Guillen said. “We were down right away and I thought the whole day was going to be very long. We fought back and won the game.”

Matt Thornton (2-5) pitched 1 1-3 innings for the win in the second game and Chris Sale went the final 1 2-3 innings for his seventh save.

Cleveland took a 4-3 lead into the seventh before Chicago rallied against rookie reliever Zach Putnam (0-1). Tyler Flowers started the rally with a single and took third on Gordon Beckham’s third double of the game. Juan Pierre’s groundout tied the game before Ramirez’s bloop single to center over a drawn-in infield gave Chicago the lead.

Beckham became the first White Sox player to have three doubles in a game since Aaron Rowand in 2005.

“It’s one of those days I’ve been searching for,” Beckham said. “Unfortunately, it comes with eight games left. I’m glad we came back and won that game. We showed some fight.”

“It’s nice to see this kid swing the bat the way he did,” Guillen said of Beckham. “He was kind of down the last couple of days. We’re all glad he got those hits.”

Both teams started rookies in the second game. Dylan Axelrod, making his second major-league start, allowed four runs in 4 2-3 innings for the White Sox while Zach McAllister, in his third big-league start, gave up two runs in 5 1-3 innings for the Indians.

READ MORE: Two Years Ago Today: First Confirmed Case Of COVID-19 Reported In Illinois

Cleveland used four rookie pitchers in the second game, which led to problems finding the plate. Putnam hit Paul Konerko in the hip in the seventh inning. Josh Judy hit Beckham in the back and Ramirez in the shoulder in the ninth. Guillen wasn’t happy seeing so many of his players get drilled, but didn’t think it was intentional.

“I don’t think they were throwing at them,” he said. “It’s a bunch of kids up from the minor leagues. You can do nothing about it. All you can do is run to first base and get the trainers.”

Cleveland managed one hit off Axelrod through three innings before scoring four times in the fourth. Jim Thome’s RBI single gave Cleveland the lead. Matt LaPorta’s run-scoring double and sacrifice flies by Grady Sizemore and Jack Hannahan completed the scoring.

McAllister held the White Sox scoreless until the fifth when Beckham’s RBI double scored Chicago’s first run. Alejandro De Aza’s two-run double off Rafael Perez in the sixth cut the lead to one.

Cabrera strained his back while batting in the eighth inning of the first game and didn’t play in the second game.

Carmona (7-15) allowed three runs in six innings and won for the first time since Aug. 17.

Travis Hafner and Kosuke Fukudome also homered off Gavin Floyd (12-12), who hasn’t won since Aug. 29.

Hafner’s two-run homer in the first gave Cleveland the lead, but Chicago tied the game in the second on Adam Dunn’s RBI double and De Aza’s run-scoring single.

Cabrera’s home run put Cleveland ahead and was his 24th of the season. Cabrera, who entered Saturday’s game against Minnesota in an 0-for-20 slump, has eight hits in his last 13 at-bats. He leads the Indians with 87 RBIs, eclipsing his previous career high of 68 in 2009.

“I’m really happy with what I’ve done, but I haven’t thought too much about it,” he said. “I think we’ve had a good season, and it’s not over yet.”

NOTES: The first game was the makeup of a July 23 rainout at Progressive Field. … Guillen says LHP Mark Buehrle will start Wednesday night. Buehrle (11-9, 3.74 ERA) has sore biceps after being hit with a ball in his last start. RHP Ubaldo Jimenez (4-2, 4.56) will start for the Indians. … Guillen played most of his regulars in Tuesday’s first game. … The Indians are playing nine games in seven days on their final homestand of the season. Cleveland played a makeup game with Seattle on Monday and will play another day-night doubleheader against Minnesota on Saturday. … The Indians recalled RHP Corey Kluber from Triple-A Columbus.

MORE NEWS: MAP: At Least 276 Kids 16 And Younger Have Been Shot In Chicago Since 2021

(TM and © Copyright 2010 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)