NEW YORK — Yoenis Cespedes was back in the lineup Monday night for the New York Mets, who were still without double-play partners Neil Walker and Asdrubal Cabrera for the first game of a pivotal series against Miami.

Wilmer Flores started at second base in place of Walker, sidelined for the second consecutive day by a stiff back. Kelly Johnson was at third, with Jose Reyes sliding over to Cabrera’s spot at shortstop.

Cabrera struck out as a pinch-hitter to end the seventh inning.

The NL player of the week last week, Cabrera exited Sunday’s loss to Philadelphia in the first inning after aggravating a left knee injury that sidelined him twice earlier this year.

Cespedes sat out Sunday after his nagging right quadriceps flared up, but the slugger played left field and batted third Monday against Marlins ace Jose Fernandez in the opener of a four-game series.

With both teams chasing a wild-card berth, second-place Miami entered a game ahead of the Mets in the NL East.

Cabrera went through agility drills before the game. He had trouble running and moving side to side, manager Terry Collins reported.

Collins also said he thought Walker would probably be unavailable — and his status for Tuesday was uncertain.

Despite the injuries, the Mets made a curious roster move when they optioned infielder T.J. Rivera to Triple-A Las Vegas to open a spot for right-hander Rafael Montero. That left New York without a healthy backup infielder, because Walker and Cabrera were the only two on the bench.

The team had hoped Cabrera or Walker — maybe even both — would be able to play.

“We did not know we were short until about 10 minutes ago,” Collins said approximately three hours before the game.

Recalled from Double-A Binghamton, Montero started in place of Jacob deGrom, who was skipped to rest and regroup following two poor outings in a row. The 2014 NL Rookie of the Year is expected to return to the rotation Friday night in the series opener against Washington, with Noah Syndergaard to follow on Saturday, Collins said.

Yet the Mets chose not to send down rookie Robert Gsellman or any other pitcher — even though Gsellman probably won’t be available for a few days. The right-hander, who threw 94 pitches over six-plus innings Sunday in his first major league start, will likely move to the bullpen once he recovers from his outing, Collins said.

That is pending the return of Steven Matz (shoulder), expected to come off the disabled list Thursday to start against Miami.