Neil Walker of the Mets sits in the dugout before...

Neil Walker of the Mets sits in the dugout before game against the Giants at AT&T Park on Aug. 21. Credit: Getty Images / Jason O. Watson

For weeks, Mets second baseman Neil Walker quietly dealt with the fallout of a herniated disc in his back. That included taking the field even when he had lost feeling in one of his feet.

The condition only worsened, which was confirmed by a comparison of MRI images taken in June and in August. With each subsequent opinion he sought from back specialists, his reality grew more bleak.

Even then, Walker only begrudgingly decided to have back surgery that will end his season, and perhaps his tenure with the Mets.

“It was a very difficult decision,” Walker said, speaking publicly for the first time since the Mets announced on Wednesday that he will have surgery. “There was a lot of factors that were involved, the way the team was playing, the way I felt. I did everything I could.”

Walker rehabbed a similar issue in 2012. Since then, he has dealt with periodic setbacks, including one in June that sidelined him for a handful of games. His back flared up again in August, and this time he needed more time to bounce back, the wear and tear catching up with him.

“It just got to a point where it was just too much,” he said.

Typical actions on the field — running, sliding, even touching bases — further irritated the nerves in his back and triggered more weakness in his lower body. He estimated that playing through the condition rendered him only 60 percent of his full capacity.

Walker went along with an initial plan to play through the issue. General manager Sandy Alderson reiterated that mindset on Wednesday afternoon, when he downplayed the severity of the injury. But later in the day, manager Terry Collins acknowledged that keeping Walker on the field would mean liberal use of off days.

By the end of Wednesday night’s 5-2 win over the Marlins — only a few hours after Alderson’s declaration — Collins announced that Walker will undergo surgery.

“The more I tried to push through it, the more I realized that I was hurting both the team and myself,” said Walker, who bows out with the Mets in the middle of a chase for the final wild card. “I had to be honest with what was going on here. Like I said, this was a very difficult decision. Want nothing more than to be on the field. It’s very disappointing, in my eyes.”

Walker will undergo a microdiscectomy, a procedure that will relieve pressure from his spinal column. He said recovery will take three months.

The development comes at a bad time for both himself and his team. Walker, 30, will be a free agent this offseason for the first time in his career. He had hoped to parlay this season into a multiyear deal, the kind that evaded him before he was traded by the Pirates last offseason. Surgery could dampen those chances, even though Walker enjoyed a strong season.

The Mets declined to offer Daniel Murphy a multiyear contract, which hastened their search for a replacement. Walker arrived via a December trade for Jonathon Niese.

In 113 games, Walker hit .282 with 23 homers and 55 RBIs. Though he endured a slump that lingered for nearly two months, he got off to a strong start that propelled the Mets early in the season. He also closed out on a tear.

The Mets have expressed interest in maintaining the relationship. It once was a given that they would make a qualifying offer at season’s end. But surgery has changed the equation, and the Mets face a more complicated decision.

“I’ve absolutely enjoyed my time here,” Walker said. “I’m very open to the next step and the process of what’s next and the possibility of coming back here.”

Newsday LogoSUBSCRIBEUnlimited Digital AccessOnly 25¢for 5 months
ACT NOWSALE ENDS SOON | CANCEL ANYTIME