Aaron Judge may be going through the worst stretch of his first full season in the majors, but when he crushed a David Price first-pitch fastball in the top of the eighth, the Boston lefty had just one thought.

“I didn’t think it would go in the bullpen,’’ Price said. “I thought it was going to hit the Jumbotron, to be honest. That’s the loudest ball I’ve heard. I’m pretty sure the wind was blowing in tonight and that’s the only reason that ball stayed in — other than Jackie. That was special.”

Instead of a two-run homer that would have gotten the Yankees to within a run, however, Judge’s rocket to the deepest part of center field at Fenway Park turned into a highlight for Jackie Bradley Jr. and the Red Sox, as they held on to beat the Yankees, 3-0.

When Bradley broke for it, the center fielder didn’t appear to have a chance.

But he was able to race back and made an incredible leaping catch to rob Judge of what would have been his 31st homer of the season — and first since he won the Home Run Derby last Monday.

“That’s one of those balls you try to time up while it’s in the air,” Bradley said. “Those types of plays rarely happen. A lot of different things have got to go right.”

Like Bradley’s calculations.

“I know I timed up my steps,’’ he said. “I wasn’t sprinting back to the wall and waiting. You don’t jump into the wall, but actually go up.”

Judge said he wasn’t sure it would make it.

“I thought it had a chance,’’ Judge said. “But I just hit it to the wrong part of the park and the wrong center fielder. Jackie’s been making plays like that for a long time.”

The play stunned Price and the sellout crowd, as the Red Sox managed to split the doubleheader and the four-game series after dropping the first game on Sunday, 3-0.

Price took care of the rest.

The left-hander threw eight shutout innings, giving up seven hits — and no walks — while fanning eight — in his longest outing of the season.

In just the second season of a seven-year, $217 million deal, Price has battled with the Boston media — including a reported confrontation on the team plane with ex- Red Sox Dennis Eckersley — and been inconsistent on the mound.

see also

On Sunday, though, Price looked like the ace he has been in the past. He easily outperformed Masahiro Tanaka in one of Price’s best showings against the Yankees.

After they scored six runs in five innings against Price in The Bronx on June 8 — thanks to two homers by Gary Sanchez — the southpaw looked like a different pitcher on Sunday. His ERA has dipped from 5.14 on June 18 to 3.39 following Sunday’s outing.

“It was a good day,” Price said.

For him and Bradley.

“I wouldn’t say that was the most difficult catch I’ve ever made, but given the situation and timing, it’s pretty high up there,” Bradley, Jr. said.