Just as Robinson Cano was heating up, the Mets second baseman exited Sunday’s game against the Pirates with a left hamstring strain.

Cano pulled up lame halfway between first and second base in the fourth inning on what would have likely become his third double of the afternoon. Instead he couldn’t get himself back to first, and was tagged out as the Mets already led 8-0 in Pittsburgh. The team later announced the injury.

Cano has battled a couple of injuries stemming from his left quad this season, and has mostly struggled when in the lineup.

But with the Mets clinging to scant playoff hopes, the club’s big offseason acquisition had rebounded to hit 10-for-25 (.400) on the road trip. Jeff McNeil shifted from right field to second base, Michael Conforto moved from center to right and Juan Lagares entered the game at center with Cano out.