CHICAGO – Long before Sonny Gray pitched seven scoreless innings in the Twins' 4-0 win over the White Sox on Sunday, he prepared himself mentally for days like this.

Gray remembers all the sprints he ran with Twins strength coaches Chuck Bradway and Aaron Rhodes in April and May. When he was nearing the end of his workouts, Bradway and Rhodes often yelled out, "This one is for September" and "Do one more for October."

After spending time on the injured list in 2021 and 2022, Gray was determined to show he could still be the workhorse of a team's rotation. What Gray planned in his mind, noting he thought a lot about it at the end of last season, looked a lot like what he did at Guaranteed Rate Field.

Gray completed his seven innings in an efficient 81 pitches against a lethargic lineup. He struck out six and did not allow a walk. Backed by homers from Edouard Julien and Jorge Polanco, the Twins dropped their magic number to clinch the American League Central division title to six. The second-place Cleveland Guardians completed a three-game sweep over the Texas Rangers, so the Twins cannot clinch before Wednesday.

"This is a big year for [Gray] going into free agency," catcher Ryan Jeffers said. "Not only for the team, but for him as a career. For him to stay healthy, take care of his body and to continue to dominate like he's doing, he's been huge for us."

Every time the White Sox put a runner on base, the 33-year-old Gray seemed to pitch even better. He erased a single in the first inning with a strike 'em out, throw 'em out double play.

"Honestly, I didn't think the game was going to start at 1:10 p.m.," Gray said after a rain-filled morning. "I was fully anticipating us getting delayed. The strike 'em out, throw 'em out in the first inning was something that really jumpstarted me."

Gray wasn't happy with the way he pitched in his last start, throwing 91 pitches over four innings against the Tampa Bay Rays. All week, he said, he focused on working ahead in counts and challenging hitters with pitches over the plate.

Andrew Benintendi hit a leadoff double in the fourth inning and moved to third base on a flyout. In a scoreless game, Gray struck out Eloy Jiménez on a curveball in the dirt, eliciting a check swing, and ended the inning with a flyout.

The sixth inning started with a double from Elvis Andrus, Chicago's leadoff batter. Center fielder Andrew Stevenson contributed with a running catch in front of the wall, but Gray escaped unscathed by striking out Andrew Vaughn and inducing a popup in foul territory against Jiménez.

"Time to put your money where your mouth is," said Gray (8-7), who lowered his ERA to 2.84, which trails only New York Yankees ace Gerrit Cole (2.81) for the AL ERA lead. "Now is the time — are you going to stay to your plan? Are you going to execute what you've talked about? … Those are the challenging ones."

Jeffers hit a one-out single in the fifth inning, the Twins' first hit against White Sox starter Dylan Cease (7-8) since the second inning. Kyle Farmer followed with a nine-pitch walk, which prompted a mound visit between Cease, catcher Korey Lee and all the White Sox infielders.

Six pitches later, Julien lifted a down-the-middle fastball over the wall in left-center field for his 14th home run of the season. It was just the third time Julien hit a homer this year with a runner on base.

Twins acting manager Jayce Tingler asked hitting coaches this past week why Julien has so much power to the opposite field.

"They just said the way he's built," Tingler said. "The core from his hip to shoulder, when he turns, it just creates a ton of power."

Polanco opened the eighth inning with a first-pitch homer off reliever Luis Patiño, a sinker that didn't sink below the middle of the strike zone. Polanco's 111th career homer broke a tie with Roy Smalley for the most homers in Twins history by a switch hitter.

Taking three games in the four-game series in Chicago, the Twins finished their season series with a 9-4 record.