Neil Walker has accepted a one-year qualifying offer of $17.2 million, ensuring a reunion between the Mets and the switch-hitting second baseman, who became a prominent part of the starting lineup in 2016.

“Happy to say I’m back in Orange and Blue for 2017!! Let’s go Mets! #unfinishedbusiness,” Walker tweeted shortly after accepting the offer.

Walker was one of only two players to accept qualifying offers by Monday’s 5 p.m. deadline, joining Phillies righthander Jeremy Hellickson, who would have been one of the best pitchers available on the market.

Mets outfielder Yoenis Cespedes was among eight players who did not accept the qualifying offer, choosing to test free agency. If another team signs him, it must surrender a first-round draft pick, an added cost on top of the multiyear deal he’s expected to receive.

Others to decline qualifying offers were Jose Bautista, Ian Desmond, Edwin Encarnacion, Dexter Fowler, Kenley Jansen, Mark Trumbo and Justin Turner.

Walker, 31, is coming off one of his best seasons. In 113 games, he had a slash line of .282/.347/.476 with 23 homers and 55 RBIs. He equaled a single-season best for homers, a spike driven by improved power numbers from the right side.

advertisement | advertise on newsday

Although back surgery in September ended Walker’s season prematurely, the Mets extended the qualifying offer, convinced that his back will not be an issue moving forward.

According to a source, the Mets still have interest in exploring a long-term deal with Walker, who would have been arguably the best middle infielder in a thin market. Had Walker declined the qualifying offer, signing him would have cost any other team a draft pick.

Instead, the Mets return a big bat. And bringing back Walker will become even more important if Cespedes winds up signing elsewhere, which would leave the Mets needing to replace that level of production.

Mets videos

Such a task will be easier with Walker in the fold. His $17.2- million salary for next season is a larger sum for one year than he likely would have received in a multiyear deal, but it’s a premium the Mets were willing to pay.

Keeping Walker brings the Mets’ payroll to about $120 million. The club is expected to pursue a reunion with Cespedes, which would take salaries above the $140 million the Mets spent last year.

Acquired last offseason from the Pirates in a trade for lefthander Jonathon Niese, Walker finished the season as one of the top offensive second basemen in the National League.

The Mets’ in-house alternatives included T.J. Rivera, Wilmer Flores and Jose Reyes. Rivera has nowhere near the same track record as Walker, and with plenty of uncertainty surrounding third baseman David Wright, Flores and Reyes likely will be used throughout the infield.