Joe Girardi shuffled his rotation for Wednesday’s matinee against the Twins so that Luis Severino could be available to start on the regular season’s final day if the Yankees are still in contention for the AL East crown.

If the Yankees fall short in the division and don’t use Severino Oct. 1, the righthander will likely start the wild-card game Oct. 3. At the moment, the Yankees’ opponent would be the same Twins.

Severino pitched poorly Wednesday, allowing three runs in three painfully slow innings in his first career appearance against Minnesota. But the Yankees shrugged off their ace’s outing and pummeled the Twins, 11-3, behind home runs from Aaron Judge, Gary Sanchez and Didi Gregorius.

“Really a nice job by our offense coming back,” Joe Girardi said. “I looked at Sevy’s outing — I just thought he was a little off today.”

The Yankees are seven games ahead of the Twins in the wild-card race after sweeping the three-game series. They remained three games behind the first-place Red Sox, who completed a three-game sweep of the Orioles. The Yankees, who have won seven of eight and are 14-5 in September, have 10 games left.

The Yankees faced the Twins four times in the postseason, all in the ALDS, in 2003, 2004, 2009 and 2010. The Yankees won all four series and 12 of the 14 games.

advertisement | advertise on newsday

With that history, and after this series, it’s unlikely the Yankees will fear the Twins if they meet in the wild-card game. Minnesota is being chased most hotly by the Angels and then by a host of other teams who seem to be just about out of time.

Severino allowed three runs in a 46-pitch third inning, on an RBI single by Joe Mauer (to complete a 13-pitch at-bat) and Jorge Polanco’s two-run single.

“I think everything was good until that at-bat against Mauer, because I was getting tired,” Severino said. “I have to tip my cap to him right now. That was sick. I couldn’t go more than that. Thirteen pitches to Mauer and I think I threw 40-something pitches. I was tired.”

Yankees videos

But Minnesota’s 3-0 lead did not last long. Judge hit a two-run homer inside the rightfield foul pole on an 0-and-2 pitch from Bartolo Colon in the third. It was Judge’s 45th and gave him 100 RBIs.

“That’s just an example of me just being in a good position because I’m on a good team,” Judge said. “These guys always put me in a good position. There’s always guys on base for me.”

Sanchez followed with his 32nd, a blast onto the netting over Monument Park, to tie it at 3.

Severino, who threw 71 pitches, did not come out for the fourth. He was replaced by Chasen Shreve (4-1), who threw three scoreless innings and became the pitcher of record when the Yankees took the lead with a six-run fourth.

Red-hot Jacoby Ellsbury (3-for-4, walk) tripled with one out and, after a walk to Todd Frazier, scored the go-ahead run on Greg Bird’s double into the rightfield corner.

advertisement | advertise on newsday

“Bounced back quick,” said Bird, who went 3-for-4. “You’ve got to punch back. We’ve been playing well. We got down early and we bounced back.”

Colon was replaced by Tyler Duffey, who gave up RBI singles to Brett Gardner and Sanchez before Gregorius rocketed a three-run homer to the second deck in right for a 9-3 advantage. Gregorius’ 25th home run set a franchise season record for a shortstop. Derek Jeter had 24 in 1999.

Colon (6-14, 6.63) was charged with six runs in 3 1⁄3 innings.

In the fifth, a run scored on a wild pitch and Judge added a sacrifice fly as the Yankees extended the lead to 11-3. That began a process of emptying both benches.

“It was just an example of guys having quality at-bats all day,” Judge said. “You start off a little slow and just turn it on. Hitting’s contagious. When one guy starts getting a couple knocks, it just feeds into the next at-bat.”