Mets reliever A.J. Ramos pitches in the sixth inning against...

Mets reliever A.J. Ramos pitches in the sixth inning against the Miami Marlins at Citi Field on May 21, 2018. Credit: Jim McIsaac

Mets reliever A.J. Ramos underwent successful season-ending surgery to repair a torn labrum in his right shoulder.

The surgery was performed by David Altchek Wednesday at the Hospital for Special Surgery in Manhattan and Ramos said the recovery time should be around 12 months.

Ramos, who will be a free agent at the end of the year, said he’s been trying to pitch through the pain stemming back to the end of last season. He said he hadn’t felt right since spring training.

“I was used to pitching with some sort of uncomfort, so that’s what I would do,” he said Sunday. “But it got to the point where I couldn’t even locate a ball and it hurts to throw and I was affecting the team negatively, and that’s the biggest thing.”

Ramos, who the Mets acquired from the Marlins at last season’s trade deadline, ends this season with a 6.41 ERA in 28 relief appearances.

“This is not a good surgery to have, especially being a free agent, especially being 31 years old, so my back is against the wall here,” the seven-year veteran said. “You have to find a way to dig deep and this is when I perform. When the pressure’s on me, this is when I perform.”

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME