The Yankees' Gerrit Cole celebrates with teammates after clinching the...

The Yankees' Gerrit Cole celebrates with teammates after clinching the American League East title in a game against Baltimore Orioles on Thursday at Yankee Stadium. Credit: AP/Noah K. Murray

Gerrit Cole was barely recognizable. Cap backwards, goggles down, his face masked in a champagne sheen as bottles sprayed all around him.

But on the mound, a few hours earlier Thursday night, there was no mistaking the pinstriped assassin who dismantled the Orioles in the 10-1 division-clinching victory before a raucous crowd of 42,022 in the Bronx.

Cole’s season-long journey from reigning Cy Young champ to rehabbing ace to shutdown No. 1 starter again mirrored the Yankees’ own return to the top of the AL East, so it was only fitting that he closed out the Orioles — and launched yet another October quest for that ever-elusive No. 28. Aaron Judge supplied home run No. 58, his fifth in five games, and Giancarlo Stanton also went deep, adding four RBIs, but Cole was the tone-setter with October right around the corner.

“It’s just a little peek at his brilliance, really,” manager Aaron Boone said. “Losing two tough games [to Baltimore], you want to get this thing done, so there was some pressure going into today. And with Gerrit, you look back over his Yankee career, it’s obviously been outstanding. But he’s had several moments of truth, moments of little crossroads, and he’s answered the bell, shown himself to be such a big-game guy, and it was more excellence tonight.”

Cole allowed just two hits over 6  2⁄3 scoreless innings — a pair of singles — struck out five and the Orioles never even got as far as second base. Any lingering concerns about Cole eventually getting back to his Cy Young self dissipated a while back, however, and the Yankees had the right man for the job in sending him out for Thursday’s clincher. Cole was surgical, retiring the first eight straight before James McCann’s walk in the third inning and he didn’t surrender his first hit until Ramon Urias’ two-out single in the fifth.

“You just feel alive,” Cole said. “It’s the best feeling. The stakes are high. The juices are flowing. You’re out there, just trying to be yourself.”

The two defining moments of Cole’s bravura performance? One came with two outs in the sixth, when Cole thought he had Anthony Santander struck out with a perfectly spotted knuckle-curve at the top of the strike zone. Both Cole and catcher Austin Wells began strutting off, only to pull an annoyed reversal. But once Cole got the ball again, he rifled a 98-mph fastball right past the swinging Santander, then stared at plate umpire David Rackley during the entire length of his walk to the dugout.

That’s the Cole the Yankees need for this playoff run, and there’s every reason to believe he’s switched on for the duration with a 2.67 ERA over his last 13 starts (80 Ks in 77  2⁄3 innings). Thursday’s other highlight for Cole was the Yankees’ ace getting the Stadium salute he so richly deserved. Once Boone came out to retrieve him in the seventh, Cole walked off to the loudest standing ovation of the night, and tipped his cap to the fans after crossing the first-base line.

“There were some ups and downs this year, but you just keep trying to plug along, give us a chance to win and not make it anything bigger than it is,” Cole said. “But tonight was fun. We had a chance to win the division and it was special to be out there.”

Plus, there was a Stadium full of frustration to let loose, the demons of 2023 to exorcise. A year ago at this time, the Yankees struggled to stay above .500 (82-80) in the season’s final days, and failed to make the playoffs for just the fourth time since the ’09 World Series crown.

There were plenty more occasions to cheer, and yes, another home run from Judge, whose three-run blast in the sixth, a 394-foot rocket, provided a loud exclamation point to the evening. As Judge circled the bases, the familiar chants of “M-V-P” rained down from the upper decks, and at this rate, who would bet against him getting to 60?

By night’s end, the Orioles barely existed anymore. Stanton had pummeled them earlier, first with a party-starter solo homer in the second inning and then a bases-clearing double in the sixth. Even Alex Verdugo — whose leftfield battle with Jasson Dominguez has been a hot topic since the prospect’s promotion — went deep in the eighth for his second homer this month.

But Thursday night, Cole had the baseball in his right hand again, and the Yankees’ fortunes with it, just like always. There was some doubt, way back in March, that would ever be the case again. Now, with peak Cole out front, the Yankees could not be more ready for October.

“I think we were optimistic that he would return to this level, but it was still a little bit of an unknown,” Boone said. “But I think all along, there continued to be that optimism that he was building to a good place.”

That place now has the Yankees as AL East champs again, poised for a deep October run.