New York Mets starting pitcher Trevor Williams walks to the...

New York Mets starting pitcher Trevor Williams walks to the dugout after being taken out of the game during the fourth inning against the Texas Rangers at Citi Field on Saturday, July 2, 2022. Credit: Kathleen Malone-Van Dyke

The Mets’ magic is missing.

Their charmed season has been less so of late, and they continued their recent slide with a 7-3 loss to the Rangers on Saturday. That dropped the Mets to 3-6 in the past week and a half. Their lead in the NL East has dwindled to 2 1⁄2 games — the tightest since the end of April.

As much as the bullpen has faltered and the rotation has needed stopgap after stopgap, this recent down stretch has coincided with another ugly trend: The Mets have stunk at situational hitting.

Since June 21, they have batted a worst-in-the-majors .137 with runners in scoring position. Before that, they led everyone with a .286 average in those situations.

The sheen of a new season has long since worn off. This is the grind-inducing portion of the baseball calendar.

“It’s that time of the year for us,” Francisco Lindor said. “Early, it seemed like everything was clicking. This is where good teams become better teams — or become worse. It shows your character. How quick are you going to be able to get out of it?”

Such poor production proved relevant again this time. The Mets (48-30) went 0-for-8 with runners in scoring position, stranding seven men on base.

Pete Alonso, the team’s most prolific collector of RBIs, was hitless in four at-bats and left five runners on. When he stepped to the plate with two on and one out in the bottom of the fifth against Texas lefthander Martin Perez, he bounced into a first-pitch, inning-ending double play.

“Pete hits the ball on the button for a double play,” manager Buck Showalter said. “Sometimes the baseball gods don’t shine on you.”

That is the sort of platitude baseball people rely on during slumps like this. Why are the Mets struggling in this way? Beats them. Lindor and J.D. Davis attributed it to the ebbs and flows of the season. Sometimes it works out, sometimes it doesn’t — and there isn’t always a knowable reason why. It just is.

Eric Chavez, the Mets’ first-year hitting coach, anticipated such regression in early May. In discussing the RISP boom, he said confidently that it wouldn’t last. It wasn’t a knock on his hitters, just a general truth that that rate of success is not sustainable over 162 games.

“You always revert back to the league [average],” he said then.

Over the past month or so, Lindor’s RISP average is down from .340 to .289. Davis has dropped from .385 to .290. Mark Canha’s number was .344 and is .295.

Those individuals still are having good seasons by this measure. Just not lately.

“It’s difficult right now,” Davis said. “I don’t know how to describe it. It’s just the way baseball goes.”

For the Rangers (37-39), Perez allowed three earned runs in 6 2⁄3 innings. All of the damage came via homers: Starling Marte’s two-run blast in the first and Eduardo Escobar’s solo shot in the fourth.

“We knew he was going to be a challenge,” Showalter said of Perez.

On a day when the Mets didn’t have many — or any — other options, Trevor Williams drew another spot start on short rest, allowing five runs in 3 2⁄3 innings. Four of the five hits he gave up were to Kole Calhoun and Jonah Heim, and three of those were home runs.

The Mets led by two when Calhoun batted with two on in the second inning. He yanked a first-pitch slider into the front of the second deck in rightfield for a three-run homer. Heim, the next batter, did the same — another slider.

“Solo homers you can pitch around and deal with,” Williams said. “But the three-run homer was the dagger.”

Showalter added: “Trevor gave us what he could give us.”

It didn’t matter much, considering the Mets’ failure in the moments that mean most.

“There’s two parts to that: getting them out there and getting them in,” Showalter said. “That’s why home runs are something that people chase because you don’t have to go through all that process. But we also are trying to stay true to who we are.”

The Mets aren’t much of a power team; they rank in the middle of the pack in home runs and slugging percentage. Alonso is their only true long-ball threat. They need to hope their RISP good fortune returns.

“It’s just a matter of time,” Davis said, “before the floodgates open again.”