WASHINGTON — It had been mere hours since Mets outfielder Yoenis Cespedes limped off the field. The night before, he was hobbled by a cramp that seized his right hamstring as he slid for a game-saving catch, an attempt that was ultimately unsuccessful.

Yet, Cespedes insisted upon starting Tuesday morning’s game against the Nationals, a request that was denied. So went what has been an awkward dance between the Mets and their highest-paid star player.

“He’s not happy about it and I like that,” Mets manager Terry Collins said. “I like the fact that he wants to play. But we’ve got to be smart about today.”

Meanwhile, the Mets’ lineup took another jolt just before first pitch, when Curtis Granderson was scratched from the starting lineup due to lingering soreness in his right hip. T.J. Rivera stepped in to play leftfield with Wilmer Flores moving into the starting lineup to play third base.

Granderson has not started since Saturday, when he began feeling pain and discomfort in his right hip. After sitting out Sunday’s series finale against the Phillies, Granderson came off the bench Monday night to deliver a game-tying two-run shot in the ninth inning.

Of course, it was all rendered moot when the Nationals walked-off the Mets, taking a 3-2 decision on Ryan Raburn’s game-winning hit in front of a sliding Cespedes in the bottom of the ninth.

Shortly after watching his star slugger limp off the field , Collins said Cespedes would not start in the following day’s 11 a.m. game. Cespedes’ history of leg injuries made it easy to stick with his original declaration from the night before — especially with more heat and humidity in the forecast.

advertisement | advertise on newsday

“I talked to Yo this morning,” Collins said. “He wanted to play. I get it. I think it’s great. But the fact that he cramped up last night, the dehydration is just an issue. We cannot afford to have him blow out that hammy again and miss him for two months.”

Cespedes has already missed 37 games on the disabled list, first with a left hamstring strain, and then with a right quad injury that slowed down his minor-league rehab.

The Mets were concerned enough about Cespedes’ history of leg problems that he was sent for a battery of tests to detect any potential underlying causes. For example, David Wright’s diagnosis of spinal stenosis came only after a hamstring injury.

In the case of Cespedes, no root cause was found.

Upon his return on June 10, the Mets eased Cespedes back into action, building in routine off days. He also began a new pregame routine. Collins said Cespedes had even been especially mindful of staying hydrated. On Monday, it did not help him when we charged at Ryan Raburn’s sinking liner in the bottom of the ninth, which hit Cespedes’ glove then hit the turf to trigger a celebration after a walkoff.

Mets videos

Since going 3-for-5 with a double and a homer against the Giants on June 23, Cespedes has hit the skids. In the eight games since that outburst, he’s hitting .152 (5-for-33) with no extra base hits.

“It tells you how hard the game is,” Collins said. “The best of the best slump. He’ll get it going.”