Red Sox manager John Farrell, right, takes reliever Addison Reed...

Red Sox manager John Farrell, right, takes reliever Addison Reed out of the game as catcher Christian Vazquez talks to Reed during the eighth inning against the Yankees on Friday, Aug. 11, 2017. Credit: AP / Frank Franklin II

Before nicking Brett Gardner on the toe of his right foot during Friday night’s fateful eighth inning in the Bronx, the last time Addison Reed nailed a batter with a pitch was March 23, 2014.

His Diamondbacks against the Dodgers. At the Sydney Cricket Grounds. In Australia.

It doesn’t happen very often. Like almost never. Yet here was Addison Reed, former Met, in what had to be his biggest spot for his new employer, the Red Sox, trying to protect a 3-0 lead against a Yankees team desperate to close a widening gap in the American League East.

But with Gardner leading off, Reed held on to his slider a smidge too long, yanking the second pitch of the inning into the lefthanded hitter’s front foot. After a short video review, the umpires confirmed that Gardner had been struck — barely.

“You never help yourself when you’re all over the place,” Reed said after the Yankees’ 5-4 victory, a win made possible by his eighth-inning implosion.

The Gardner plunking, as it turned out, was only the beginning for Reed, who would not retire a batter during what became a five-run eighth for the Yankees.

For all the public sniping between the Mets and Yankees during the past few days, generated by Sandy Alderson shipping Jay Bruce to Cleveland rather than the Bronx, it looks as if Brian Cashman should be sending a thank-you note to 123-01 Roosevelt Ave., Flushing, after Reed’s huge assist.

Sure, the Yankees deserve credit for rallying back from a 3-0 deficit. But if Alderson hadn’t traded Reed to the Red Sox at the deadline, maybe that five-run surge never would have happened, because the Yankees couldn’t dent Eduardo Rodriguez or Matt Barnes.

Reed, however, was a different story. Since coming to Boston, he had allowed only one earned run in four appearances, with four strikeouts and zero walks in 3 2⁄3 innings. Red Sox manager John Farrell had entrusted Reed to be one of his eighth-inning options and had no reason to lose faith Friday night, especially with a 3-0 lead.

But that changed with the Gardner slip, and Reed followed that up with another lousy slider, this a full-count pitch that Aaron Hicks lifted over the short porch in rightfield for a two-run homer. In that instant, the momentum turned.

“Probably not the best slider I threw all night,” Reed said. “But it was to the wrong part of the ballpark and you guys know what happened.”

Reed is no stranger to playoff-intensity baseball. He was the setup man for Jeurys Familia in the Mets’ march to the World Series in 2015. So it’s not as if he necessarily wilted in the Bronx heat on this occasion.

But after Hicks’ rainbow, Gary Sanchez lined a single and took second when Reed uncorked a wild pitch, only his second this season. Next up was Aaron Judge, who was hitting .172 (15-for-87) since the All-Star break, with 41 strikeouts in 26 games. The unhinged Reed walked him on five pitches.

“It happens,” Reed said. “I just picked a bad time for it to happen.”

The Yankees finished the job against Joe Kelly, with Didi Gregorius and Todd Frazier supplying back-to-back RBI singles that put them ahead to stay and Ronald Torreyes adding a sacrifice fly. Reed wound up being saddled with four earned runs for the first time since 2015 as a D-back.

Reed was the Mets’ greatest trade deadline chip, and he yielded the best haul. It’s interesting to note that the Mets tried to do deals with the Yankees for Lucas Duda and Bruce, but the talks collapsed, the latter in contentious fashion just this week.

Alderson did get Reed to Boston, however. And if the Yankees win the division by one game, Cashman might want to buy him dinner.