NEW YORK (AP)Gerrit Cole delivered the sort of gem Yankees fans dreamed on when he signed a $324 million deal. Aaron Judge led an offensive barrage in a ballpark packed for his bobblehead night. Manny Banuelos finally pitched in pinstripes, living out a teenage dream that famously escaped him.

”I heard them chanting my name, which was pretty magical,” Cole said.

Almost perfect. Again.

Cole pitched perfectly into the seventh inning a night after teammate Jameson Taillon lost his bid in the eighth, Judge homered and had four hits, and New York thumped the Detroit Tigers 13-0 on Friday for its largest margin of victory since 2009.

The Yankees are the first team with consecutive perfect-game bids of six innings or more since at least 1961, according to the Elias Sports Bureau.

”I have to stop looking up in the sixth,” catcher Jose Trevino joked. ”I mean, every time.”

Trevino, Anthony Rizzo and Matt Carpenter also homered for New York against rookie Elvin Rodriguez (0-1), charged with 10 runs in his third big league start. The major league-leading Yankees won for the eighth time in 10 games, cooling off a fourth-place Tigers team that had just taken four of five from AL Central-leading Minnesota.

Jonathan Schoop spoiled Cole’s perfect night with two outs in the seventh. Schoop grounded a cutter up the middle, just past the mitt of diving second baseman DJ LeMahieu, who made a sliding stop against Harold Castro for the second out.

”Got to the corner, but not quite as much break as we would’ve liked,” Cole said of the pitch.

Cole (5-1) got an ovation from the 42,026 fans at Yankee Stadium, some of whom surely were on hand a night earlier when Taillon lost a perfect game in the eighth against the Los Angeles Angels. Jared Walsh spoiled Taillon’s try with a leadoff double that deflected off the glove of sliding shortstop Isiah Kiner-Falefa.

Cole was pulled after seven scoreless innings with two hits allowed and nine strikeouts on 102 pitches. He grabbed a video tablet in the dugout as soon as he finished the seventh and appeared to replay Schoop’s hit several times.

There have been 23 perfect games in major league history, including two before 1900. The most recent was thrown by Felix Hernandez for the Seattle Mariners against Tampa Bay on Aug. 15, 2012 – the last of three that season.

Cole overpowered the hapless Tigers with a fastball up to 100 mph, dominating a team that entered Friday averaging 2.86 runs per game, worst in the majors since the 1968 White Sox.

”He was in complete control of virtually every at-bat,” Detroit manager A.J. Hinch told reporters.

Willi Castro began the game with a routine fly to right measured at 87.3 mph off the bat, and that remained the hardest-hit ball for Detroit until Harold Castro’s groundout in the seventh.

Cole is the eighth consecutive Yankees starter to cover at least six innings, the best stretch for the franchise since a nine-game streak in 2016.

”I think anytime you’re a close-knit group like those guys are and you’re challenging each other and learning from one another, I think that environment is one that you have a better chance to thrive in,” New York manager Aaron Boone said. ”So I think that’s happening.”

Cole redeemed himself for a miserable outing April 19 at Detroit, when he matched a career high with five walks and allowed two runs while lasting just 1 2/3 innings. The 31-year-old – signed to a $324 million, nine-year deal prior to the 2020 season – has never thrown a no-hitter.

Banuelos relieved Cole for his first major league appearance since 2019 and closed out the three-hitter. Formerly a top Yankees prospect, Banuelos joined leagues in Mexico and Taiwan on his road back to the big leagues.

”This is amazing,” Banuelos said. ”This is huge for me. I’ve been waiting for this a long time.”

”That was the coolest part of the night,” Cole added.

Judge became the first player in the majors with 20 homers after sending a solo drive to right in the third. The ball landed just in front of the Judge’s Chambers cheering section. He ripped an RBI single off Harold Castro’s 59 mph lob in the eighth for his fourth hit.

The Yankees exposed the Tigers’ defense during a three-run fourth, with Carpenter bunting against the shift and later scoring on Trevino’s drive to center, which was badly misplayed by Willi Castro. A natural shortstop, the 25-year-old Castro was playing his ninth pro game in center.

JD’S BACK

Josh Donaldson (shoulder) was activated from the 10-day injured list and in the lineup for the Yankees for the first time since being suspended by Major League Baseball for a remark about Jackie Robinson to Chicago White Sox star Tim Anderson. Donaldson was 0 for 3 with two walks.

TRAINER’S ROOM

Tigers: OF Austin Meadows plans to make rehab starts with Triple-A Toledo on Saturday and Sunday. Meadows has been on the injured list since May 16 with vertigo symptoms. … OF Akil Baddoo (oblique) will begin a rehab assignment with High-A West Michigan this weekend.

Yankees: DH/OF Giancarlo Stanton could return from a right calf strain Saturday or Sunday. … RHP Chad Green had Tommy John surgery and likely will be sidelined until at least summer of 2023. … LHP Zack Britton (Tommy John surgery) threw a bullpen at the Yankees’ complex in Tampa, Florida, and could return late this summer. … RHP Domingo German (right shoulder) is expected to throw a simulated game soon.

ROSTER MOVES

After the game, the Yankees optioned INF/OF Miguel Andujar to Triple-A Scranton/Wilkes-Barre. They also reinstated OF Tim Locastro from the 10-day injured list and optioned him to Triple-A.

UP NEXT

Yankees RHP Luis Severino (3-1, 3.38 ERA) faces Tigers rookie RHP Beau Brieske (0-4, 5.25) in the middle leg of a three-game set Saturday. Brieske has allowed 10 homers in seven starts.

Follow Jake Seiner: https://twitter.com/Jake-Seiner

More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP-Sports