Yankees starting pitcher Gerrit Cole, right, meets with catcher Ben...

Yankees starting pitcher Gerrit Cole, right, meets with catcher Ben Rortvedt during the first inning against the Pirates in Pittsburgh on Friday. Credit: AP/Gene J. Puskar

PITTSBURGH — Gerrit Cole’s return to his first big-league city started out like the Pitts on Friday night but then got better.

Cole, the American League Cy Young Award favorite, allowed runs in each of the first two innings to the Pirates at PNC Park. He walked as many batters in the first inning — three — as he has in an entire game all season.

But Cole settled down and threw three more scoreless innings. He departed after five innings and 93 pitches, having allowed six hits and three walks with four strikeouts, and ended up with a no-decision.

The Yankees won, 7-5, with a four-run ninth inning. The tying and go-ahead runs scored on a two-out throwing error by Pirates second baseman Ji Hwan Bae on what would have been a game-ending double- play ball hit by Anthony Volpe.

“We caught a break,” manager Aaron Boone said after the Yankees’ 13th win in the last 18 games.

Estevan Florial walked with the bases loaded and none out in the ninth to make it 5-4. After the throwing error gave the Yankees a 6-5 lead, singles by Oswald Peraza and Oswaldo Cabrera made it 7-5.

Cole was drafted by the Pirates and started his career in Pittsburgh. Before Friday, he hadn’t faced his old club in Pittsburgh since getting traded to Houston in 2018. The Yankees played two games at PNC Park last season, but Cole didn’t pitch.

The Pirates took a 1-0 lead against Cole on Jack Suwinski’s first-inning sacrifice fly. Further damage was avoided when Cole got former Yankee Miguel Andujar to fly out to deep center with the bases loaded to end the inning.

After the Yankees tied the score in the second on an RBI single by Ben Rortvedt, Cole gave up another run in the bottom half on Bryan Reynolds’ two-out RBI single.

“It was a bit of an odd . . . it was a different experience,” Cole said. “I saw several people before the game that I felt like deserved a hat tip, which I’ve never tipped my hat to anybody in the stands at any point before a game. But there were just some people that were around that were impactful in my life.

“I struggled a lot in the first inning early in my career, and I struggled a lot on that mound in the first inning early in my career, and I made a point to try to get better at that at this place. It was a humbling experience tonight.”

Run-scoring singles by DJ LeMahieu and Aaron Judge in the sixth put Cole in line for a possible 14th win, but he wound up with a no-decision when Anthony Misiewicz allowed the tying run in the sixth on a two-out RBI single by Bae in which Misiewicz was hit by a line drive and injured. Ke’Bryan Hayes’ two-run single off Zach McAllister gave the Pirates a 5-3 lead.

It was the 24th time in 31 starts that Cole had allowed two or fewer runs. Cole, whose ERA rose from 2.79 to 2.81, has recorded no-decisions in 11 of those 24 starts.

More Yankees headlines

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 5 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME