Nationals starter Aníbal Sánchez walks off the field in the second inning. (John McDonnell/The Washington Post)

Aníbal Sánchez felt his left hamstring “twist” in the second inning Thursday, and he tried to pitch through it. The Washington Nationals starter had felt the tweak on a pick-off attempt to first base earlier in the at-bat against the New York Mets’ Brandon Nimmo, but by the eighth and final pitch to Nimmo, which went wide for a walk, he knew he had to leave the game.

After the game, Manager Dave Martinez said Sánchez would undergo an MRI exam Friday but, regardless of the results, he expected Sánchez to hit the injured list and miss at least his next start.

Sánchez didn’t want to depart. He had received rare run support -- four runs no less -- in the first inning. But on the last few pitches, pain prevented him from using his landing leg effectively. He walked to the dugout flanked by Martinez and head athletic trainer Paul Lessard.

“I couldn’t stop my body to home plate," Sánchez said. "That’s why I [threw] a few balls after that.”

Martinez said the solution to filling the hole in the rotation is not as simple as using Erick Fedde, who came on in relief of Sánchez, as a spot starter.

“We are going to keep our options open. We haven’t decided yet,” Martinez said. "I mean, Fedde has been pitching well, so we’ll give him a couple days and see where he is at.”

Sánchez, 35, at first thought he’d only pulled something. He tried to adjust how he landed on his left leg so it wouldn’t hurt as much, thinking he could navigate around it because of his experience in each of the past two seasons dealing with hamstring injuries. Last summer, he spent six weeks on the injured list with one.

“Most of the times that I’ve got my problem with my hamstring, it was a cramp or that kind of stuff,” Sánchez said. “Last year was the first time that I pulled my hammy, but this one was different. ... Never [anything] like that.”

He threw just 31 pitches before his day was cut short. He worked through the Mets in a perfect first inning, struck out Michael Conforto looking to begin the second and, shortly after, was being examined behind the mound by Martinez and Lessard. There was no indication of an injury before he threw that cutter to Nimmo, and Sánchez had his normal velocity and sharp secondary pitches.

“I’ve seen him frustrated before, [but] that was probably as frustrated as he’s gonna get,” said catcher Kurt Suzuki. “Just because he was really looking forward to getting back on track, and for something like this to happen, it’s pretty frustrating for him with everything that’s kind of going on. But he’ll be back, he’ll be working hard and he’ll be helping us here shortly.”

As Sánchez walked toward the dugout, Fedde rushed to warm up. He then entered to protect an early four-run lead and stranded two runners with a groundout and strikeout. But he gave up the lead in the third, when Robinson Cano hit an RBI double and Conforto tied the score by ripping Fedde’s high fastball into the right field seats.

Fedde, a 26-year-old starter, was converted to a reliever in late April and since had pitched eight scoreless innings while giving up three hits.

Sánchez, the Nationals’ No. 4 starter, entered with an 0-6 record and 5.27 ERA in eight appearances.

The Nationals cannot afford any more injuries. They have already had to play without Anthony Rendon and Juan Soto, and are still waiting for Trea Turner, Ryan Zimmerman and Matt Adams to get healthy. But if Sánchez is forced to go onto the injured list, the Nationals have Fedde as a logical replacement and could line him up to start in five days.

This series finale against the Mets was just another test for Fedde. It didn’t come as planned and, maybe as a result, didn’t quite go as planned, either. He wound up going 22/3 innings, gave up those four runs and threw 44 pitches before handing the ball to the rest of the bullpen.

Washington retook the lead that Fedde surrendered and hung on to win, 7-6, despite closer Sean Doolittle giving up two runs in the ninth, clinching its first series victory since taking two out of three against San Francisco on April 16-18.

Read more on the Nationals:

Svrluga: So you’re saying there’s a chance for the Nationals? Last year’s Dodgers proved it.

Nationals rookie Victor Robles is surprising people with his power

Rosenthal to pitch back-to-back days at Class AA

With back of rotation foundering, it is time to make Fedde a starter again?