Gerrit Cole of the Yankees pitches against the Oakland Athletics...

Gerrit Cole of the Yankees pitches against the Oakland Athletics in the bottom of the first inning at the Oakland Coliseum on Friday in Oakland, Calif. Credit: Getty Images/Thearon W. Henderson

OAKLAND, Calif. — On a night when Gerrit Cole took a step toward putting one of the most embarrassing outings of his distinguished career behind him, Juan Soto added to his burgeoning Yankees legend.

After Cole went a brilliant nine innings, Soto — scratched from the lineup during the afternoon because of swelling in the left knee he hurt the day before in Seattle — had a pinch-hit RBI double in the 10th that helped give the Yankees a 4-2 win over the A’s on Friday night in front of 23,426 at Oakland Coliseum.

“Showman-like,” Cole said with a laugh, referring to Soto. “He loves the moment, man, he loves it.”

Jasson Dominguez started the 10th at second base as the ghost runner and went to third on Anthony Rizzo’s single. With Soto at the plate pinch hitting for Trent Grisham, the Yankees took a 2-1 lead on a passed ball charged to Shea Langeliers.

Soto then sliced an opposite-field double to left off lefthander T.J. McFarland to make it 3-1. Jon Berti pinch ran for him and the third of Anthony Volpe’s three hits made it 4-2.

“Juan came to me early in the game and said, ‘If we need a hit in a big spot late, I’m good,’ ” Aaron Boone said.

Soto, who said he did feel some “relief” earlier in the day when X-rays of the knee came back negative, spent much of the pregame testing the knee in a variety of ways, including work in the cage and squats in the gym.

“It reacted pretty well,” Soto said. “So throughout the game I was feeling good. It wasn’t sore or anything after all the work we put in. That’s when I knew I had a good chance to [be able to pinch hit].”

Luke Weaver, though Boone has not officially named him the closer, nonetheless continues to close. He allowed a leadoff RBI single by JJ Bleday in the bottom of the 10th but struck out Langeliers, Seth Brown and Zack Gelof for his third save in three chances.

The AL East-leading Yankees (90-64) outhit the A’s 8-3, remained four games ahead of the Orioles and lowered their magic number to clinch the division title to five with eight games to play.

The Yankees tied the score in the top of the fifth on Volpe’s two-out RBI single, matching Langeliers’ two-out RBI single in the bottom of the fourth. Volpe entered the game in a 9-for-56 (.161) skid in September.

Cole (7-5, 3.67), who threw 99 pitches, became the first Yankees starter to throw a pitch in the ninth this season. He allowed two hits and a walk and struck out seven in nine innings.

“It’s probably one of the better sliders he’s thrown this year and honestly, I think it was because of the fastball,” Austin Wells said. “He did a great job just mixing up all of his pitches the whole night. You know, not many pitchers are going nine innings anymore, so that was really special.”

Reeling all week from his previous start against Boston, when the reigning American League Cy Young Award winner came completely unglued after issuing a controversial intentional walk to Boston’s Rafael Devers, Cole turned in an outing memorable for all the right reasons.

“Yeah, you want to pitch better,” he said of drawing extra motivation from his last start. “I was excited to pitch today because I had a chance to go do something positive for the team.”

Cole, who started the season on the injured list with right elbow inflammation and who has slowly been building his endurance since his season debut June 19, said he did not feel fatigued after nine. He even made a pitch to Boone about going out for the 10th.

Cole smiled.

“They shut that down pretty quick,” he said.

Marinaccio DFA’d. The Yankees returned righthander Cody Poteet from his rehab assignment and optioned him to Triple-A Scranton/Wilkes-Barre on Friday. To make room on the 40-man roster, they designated righthander Ron Marinaccio for assignment. Marinacchio’s last two seasons were plagued by inconsistency as he struggled to recapture the dominant form shown during his 2022 rookie season, when he posted a 2.05 ERA in 40 games.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 5 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME