Wilson Ramos, left, got to catch Jacob deGrom on Friday,...

Wilson Ramos, left, got to catch Jacob deGrom on Friday, July 5, 2019, at Citi Field, and deGrom went seven innings and gave up two runs and only three hits but got a no-decision.   Credit: Kathleen Malone-Van Dyke

As has so often been the case this year, the problem wasn’t necessarily that the Mets lost Friday night — after all, they’ve done that 49 times this season. It was how they lost. Painfully, frustratingly, and at the hands of the one player they wanted and another they discarded.

J.T. Realmuto, the catcher the Mets coveted in the offseason, doubled to lead off the ninth and Jay Bruce (remember him?) singled in the go-ahead run off Edwin Diaz as the Mets fell to the Phillies, 7-2, at Citi Field.

Diaz also allowed an RBI single by Sean Rodriguez before departing to loud boos with runners at the corners. He faced five batters, retired one and has a 5.67 ERA. Jeurys Familia allowed both inherited runners to score, plus one of his own in a five-run ninth.

The Mets squandered another quality performance by Jacob deGrom. They also squandered a challenge in the second inning, something that came back to bite them when they couldn’t challenge a play at the plate in the seventh in which the Phillies tied the score.

In other words, it wasn’t just painful. It was poetically painful.

DeGrom, who allowed two runs, has given up two or fewer runs in at least seven innings and not gotten the win a remarkable 26 times in his career, according to baseball-reference.com.

Diaz already has allowed 21 runs this year after giving up 17 all of last season. Mickey Callaway said he is open to moving him out of the closer role so he can figure things out.

“It’s hard to identify” the problem, Callaway said. “We’ve been working with the mechanics part of it .  .  . You’ve just got to keep working. It’s hard to tell what happens to guys from year to year.”

The Phillies took all of five seconds to take the lead as Scott Kingery smashed the first pitch of the night, a 97.6-mph fastball up in the zone, into the leftfield stands. DeGrom, though, settled down considerably and did not give up another hit until the seventh inning.

In the fourth, Pete Alonso smacked a 1-and-2, dead-red fastball 392 feet to left, tying the score at 1. His 29 homers are tied for third by a rookie in the first half, one behind Aaron Judge and four behind Mark McGwire.

Alonso had a two-out RBI double in the fifth, with Jeff McNeil scoring from first base.

In the seventh, Rhys Hoskins walked and Realmuto doubled to left, putting runners at second and third with none out. DeGrom quickly got the next out before Cesar Hernandez hit a chopper up the third-base line. Todd Frazier barehanded it, fired home and appeared to get Hoskins, but plate umpire Brian Gorman called him safe — and Callaway could not challenge because he had challenged unsuccessfully on a caught stealing in the second inning.

“I saw he hit Wilson’s [Ramos’] foot,” deGrom said of the play at the plate, which tied the score at 2. “I was pretty close to it and I had a good feeling he was out, but we were out of challenges .  .  . It’s frustrating.”

DeGrom gave up two runs, three hits and three walks and struck out 10.

As for Diaz, both the closer and Callaway said he had a good slider, a pitch that has caused him issues in the past. Regardless, the numbers are brutal, and though Diaz said through his translator that he wants to be a closer, “I’ll pitch whatever role he wants me to.”

He added, “To be honest, I don’t really have an answer right now. Lately, I just haven’t been getting it done.”