Yoenis Cespedes of the Mets hits a home run against...

Yoenis Cespedes of the Mets hits a home run against the Phillies in the sixth inning at Citizens Bank Park on Sunday, May 13, 2018, in Philadelphia. Credit: Getty Images / Rich Schultz

PHILADELPHIA — Yoenis Cespedes and the Mets are playing running roulette with the leftfielder’s sore right quadriceps by keeping him in the lineup, and they almost won a game because of it Sunday.

Cespedes went 2-for-4 with a home run, an infield single, a strikeout and a running catch of a sinking line drive as the Mets lost to the Phillies, 4-2. Cespedes sprinted when needed, although on a couple of occasions, he appeared to limp after doing so.

“He did a good job,” manager Mickey Callaway said. “When he had to run hard, he ran hard. When he went to get a ball in the corner, he ran hard. He hit a homer. He’s gutting it out for the team.”

Among the hold-your-breath moments were Cespedes’ third-inning single. When his line drive was knocked down by third baseman Maikel Franco, Cespedes busted it down the line and beat the throw to first. He was slow to return to the bag, however, and was checked on by first-base coach Ruben Amaro Jr. Cespedes took a moment to stretch his right leg before the next pitch.

Franco also was involved in Cespedes’ other iffy moment. In the bottom of the sixth, Franco lined a drive to left and Cespedes ran in to make the catch. His slow deceleration brought him all the way to the dirt, where he handed the ball over to his infielders.

The leg wasn’t an issue in the top of the sixth, when Cespedes homered to left on an 0-and-2 curveball, affording him all the time he needed to round the bases.

Cespedes has a history of leg issues, particularly since joining the Mets. He landed on the disabled list with a strained right quadriceps in August 2016. Last season, he missed about half the year with strains of both hamstrings, the left one in April and the right one in August. Cespedes decided to give up golf in an effort to rest his legs more.

Mets decision-makers have maintained that continuing to play Cespedes at less than his full capabilities is worth the risk, particularly at a time when the team is struggling to score and win.

Callaway said he checks in with Cespedes several times daily to make sure he feels OK to play. Assistant general manager John Ricco said over the weekend that there is constant communication with the performance staff — including the athletic trainers — about Cespedes’ condition at that moment.

The Mets also have helped Cespedes manage the injury by, for example, giving him a day off during a day game Wednesday, followed by a team day off Thursday. Callaway indicated that he will treat this week — with days off Monday and Thursday and a day game Wednesday — similarly.

“We’re not throwing caution into the wind here,” Ricco said. “We’re examining that, talking through it. We have confidence in the performance staff that we’re going to make rational decisions. Are we going to be right 100 percent of the time? No. But we have to make decisions based on the information we have, and that’s what we’re doing.”

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 5 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME ONLINE