MLB

Yankees reliever Robertson tweaks hamstring

David Robertson pitched a perfect eighth inning Wednesday night, but it didn’t end exactly the way he wanted it to.

After striking out the first two batters he faced, Robertson gave up a ground ball to second to Fernando Martinez and tried to turn quickly off the mound to head toward first base.

But he took a bad step and hurt his left hamstring, causing him to limp off the field.

After getting ice on the injury, the right-hander said he was confident he would be able to pitch when the Yankees return to action Friday night against the A’s in The Bronx following an off day Thursday

“I just kind of felt some discomfort,” Robertson said after the Yankees’ 5-4 win over the Astros. “I felt at first it was my left knee, but I think it was just my hamstring. It’s just a little tight.

“I may have tweaked it a little bit.”

Mariano Rivera came in for the ninth inning and picked up his 11th save.

“I don’t foresee it being a big problem,” said Robertson, admitting it was the first time he has dealt with a hamstring issue.

The back end of the bullpen has been one of the key factors to the Yankees’ early success and that was true again last night, with Rivera, Boone Logan and Robertson combining for 3 1/3 shutout innings in relief of David Phelps.

Robertson bounced back from a tough outing Tuesday, when he briefly gave Houston a glimmer of hope by surrendering a two-out, two-run homer to Chris Carter.

Wednesday night, he was back in good form, and the Yankees have to hope his hamstring doesn’t become a lingering problem.

“I just turned to break to go to first because anytime I see a ball go to the right side of the infield, I’m going that way, anyway.

“I don’t feel it right now. It was just a little sore when I got in the dugout so I went to get ice on it to try to keep it from getting inflamed.”

Today’s off day likely will help, and Robertson said he may get some treatment.

“I’ll be ready to go by Friday,” Robertson said.

dan.martin@nypost.com