The Yankees' Aaron Judge gestures in the dugout after he...

The Yankees' Aaron Judge gestures in the dugout after he scored against the Padres during the third inning of an MLB game at Yankee Stadium on Sunday. Credit: Kathleen Malone-Van Dyke

Gerrit Cole gave up two more home runs on Sunday. Make that eight in his past five starts after he allowed none in his first seven.

That was the concerning news for the Yankees as they concluded a homestand by hosting the Padres.

The happy news for the home team was that the offense bailed out Cole with a seven-run third inning that led to a 10-7 victory as the Yankees headed to Seattle for a series that starts on Monday night.

The Yankees improved to 32-23; the disappointing Padres are 24-29.

It was an impressive outburst against the Padres’ Yu Darvish, who was pulled after recording only eight outs.

“Just a great job by everyone of really good at-bat after really good at-bat,” manager Aaron Boone said.

That included Kyle Higashioka, who had two doubles in the third inning. He said he never had hit two doubles in an inning at any level.

“I’m just glad the guys picked me up with a big offensive inning after that incident where I tried to throw it into the second deck,” Higashioka said.

That was a reference to a bizarre play in the second.

Jose Azocar lined a two-out single to center to drive in Ha-Seong Kim. With no chance to throw out Kim at the plate, Harrison Bader airmailed his throw home far over Higashioka’s head, and  the ball ricocheted off the backstop on a fly.

Cole did not back up the plate, so Higashioka was left to try to throw out Azocar as he headed to third base. A good throw would have gotten him, but Higashioka airmailed a pop fly into leftfield well over the head of third baseman DJ LeMahieu, allowing Azocar to come all the way around with a two-run Little League home run to make it 3-1.

“He’d be the first one to say that he was pretty upset with himself with the throw that he made almost to the second deck in left,” said Aaron Judge, who hit his 15th home run of the season into the Padres’ bullpen in the first inning.

Then came the third, when eight of the first 10 Yankees batters in the inning recorded hits and seven had an RBI — and it would have been worse if not for a defensive gem by centerfielder Trent Grisham, who robbed LeMahieu of a three-run homer into the Yankees’ bullpen in the middle of the rally.

After Higashioka doubled, Anthony Volpe singled him home. Then Judge singled home Volpe. Then Anthony Rizzo singled home Gleyber Torres.

After LeMahieu was robbed, Bader hit into a forceout to drive in Judge. Then Willie Calhoun doubled home Bader, and that was it for Darvish (3-4).

Then Isiah Kiner-Falefa singled home Calhoun against reliever Drew Carlton. Then Higashioka doubled home Kiner-Falefa on a ball that ricocheted off the top of the Yankees’ bullpen wall.

Cole (6-0 after five consecutive no-decisions) had given up a home run to Jake Cronenworth in the first inning but mostly cruised through the middle innings.

The at-bat that bothered him most was a leadoff walk to Matt Carpenter in the seventh, a no-no with a five-run lead. “It just can’t really happen,” Cole said.

Rougned Odor, who had a potential home run taken away from him by Judge earlier in the game, followed Carpenter and drove the ball into the second deck in rightfield. The Padres added a run in that inning that was charged to Cole, and it was 8-6.

“Obviously, a couple of homers really killed us, but overall I thought we managed that lineup really well,” Higashioka said.

Cole said he mostly was pleased with his outing, too, but “I gave up too many runs today.” He allowed six runs (five earned) and four hits, struck out nine and walked three in six innings-plus while throwing 100 pitches.

In his first seven starts this season, Cole had a 1.35 ERA and a 0.90 WHIP in 46 2⁄3 innings. In his last five starts, he has a 5.67 ERA and a 1.56 WHIP in 27 innings.

Bader made it 9-6 with a home run to left-centerfield in the bottom of the eighth. Then Higashioka singled home Kiner-Falefa from third and it was 10-6.

The Yankees’ biggest scare came in the sixth, when Xander Bogaerts struck out and Higashioka picked Fernando Tatis Jr. off first base on the play;t in the process, Rizzo’s face slammed into Tatis’ hip.

Rizzo staggered and went down on one knee on the infield dirt, then left the game. Boone said Rizzo passed every test given to him and could play on Monday.

“He’s a tough guy,” Judge said. “He’s going to have the record for most [career] hit-by-pitches here in a couple of years. He can handle a lot.”

More Yankees headlines

Newsday LogoSUBSCRIBEUnlimited Digital AccessOnly 25¢for 5 months
ACT NOWSALE ENDS SOON | CANCEL ANYTIME