Mets starting pitcher Matt Harvey throws in the first inning...

Mets starting pitcher Matt Harvey throws in the first inning against the Phillies on Sept. 29, 2017, in Philadelphia. Credit: AP / Laurence Kesterson

PHILADELPHIA — Matt Harvey rocked his body, and tightened his grip on the baseball, preparing to fire a pitch toward the plate in the final start of his miserable season. But before the Mets righthander could even raise his arm, the ball squirted out and hit the turf for a balk.

With that bizarre moment during an otherwise meaningless 6-2 loss to the Phillies on Friday night, Harvey encapsulated his rocky road back from thoracic outlet syndrome and its messy complications.

“The positive is that this nightmare of a season is over for me,” he said. “I can look forward to a normal offseason, being healthy finally, and being able to strengthen the shoulder back up and get into a long toss program and really try to get the strength back.”

Harvey’s outing lasted just four innings. But he allowed four runs on seven hits. He struck out three and walked three. The performance raised his ERA to 6.70 in 19 games this season, the highest single-season mark in franchise history for any pitcher with at least 90 innings pitched.

Maikel Franco homered off Harvey in the second, a two-run shot that gave the Phillies a 2-1 lead. In the third, Harvey surrendered two more runs, this time on an Odubel Herrera sac fly and on his balk, which came as he attempted to deliver a pitch to Franco with Nick Williams on third.

Still, Harvey’s outing familiar pattern, with evidence of progress buried within his middling results. His fastball topped out at 96 mph and he showed flashes of a good slider, once a signature pitch that helped make him one of the best young talents in baseball.

“I continue to see some real bright spots,” manager Terry Collins said.

But Tommy John surgery in 2013 -- and a procedure to address thoracic outlet syndrome last season — have left Harvey trying to recapture his form. He spent time on the disabled list this season with a stress injury to his right shoulder, which had atrophied following surgery.

Continuing that strengthening process will be the focus of his offseason.

Said Harvey: “It’s time to really focus on getting everything back.”

Newsday LogoYour Island. Your Community. Your News.Digital AccessOnly 25¢for 5 months