Michael Cuddyer has retired from baseball, a Major League Baseball source confirmed to Newsday on Friday night, a surprising move that potentially will free up more money for the Mets to spend this offseason.

Cuddyer was due $12.5 million next season. It’s unclear exactly how much the Mets will get back from that total, though anything close to the full amount could be enough to alter their free-agency plans this offseason.

The Mets have shied away from engaging the upper end of the free-agent market and have publicly said they have little appetite for the kind of long-term deal that would be required to sign Yoenis Cespedes. However, with added financial resources, they could find themselves with an intriguing calculation to make should Cespedes’ market not develop as expected.

Just two years removed from an All-Star Game nod and leading the National League in hitting with a .331 average, Cuddyer, 36, endured one of the worst seasons of his career.

After signing a two-year deal worth $21 million — a signing that cost the Mets their first-round draft pick — he hit .259 with 10 home runs and 41 RBIs. By season’s end, he was largely supplanted in leftfield by rookie Michael Conforto.

advertisement | advertise on newsday

Cuddyer appeared ticketed for a limited bench role with the 2016 Mets, providing backup at first base and at the corner outfield spots. Through a spokesman, the Mets offered no comment. Cuddyer also did not respond to a request for comment.

Despite his struggles on the field, Cuddyer lived up to his long-held reputation as a clubhouse leader. His veteran leadership emerged earlier in the season, when the Mets struggled to keep themselves in contention.

It was Cuddyer who began the game-end ritual of awarding a WWE-style championship belt to the game MVP after every Mets victory.

Speculation about Cuddyer’s future cropped up Friday night when the transactions page on both Major League Baseball and the Mets’ website showed Cuddyer as retired. The line later was deleted off both pages, which are maintained by MLB. The spokesman declined to say if the listing was an accidental technical glitch meant to be displayed at a later date.

Cuddyer underwent surgery in November for a core muscle injury that hindered him for part of a disappointing first season with the Mets. He was slowed by a knee injury at midseason, which opened the door for the promotion of Conforto.

Mets videos

In parts of 15 seasons, Cuddyer hit .277 with 197 homers and 794 RBIs. He began his career with the Twins, who had selected him in the first round of the 1997 draft. Cuddyer broke in as a 22-year-old in 2001 and established himself as a key piece to a club that consistently pushed for postseason berths.

Cuddyer remained with the Twins until 2011, when he earned the first of two career All-Star selections.

He played three seasons with the Rockies beginning in 2012, winning the batting title by hitting .331 in 2013. He again was named an All-Star.

He wound up signing with the Mets and was reunited with David Wright, a fellow native of Virginia’s Tidewater region. Cuddyer had been a mentor to Wright during the third baseman’s days as a high school player.

From those bonds, the two formed a close friendship that endures to this day.