NEW YORK — Luis Rojas was let go as manager of the New York Mets on Monday after two losing seasons.

The team declined its option on Rojas’ contract for 2022, making the announcement a day after finishing third in the NL East at 77-85 in Steve Cohen’s first year of ownership. The move was no surprise, the first of several significant changes coming again this offseason for a club in constant turmoil.

“I want to share such heartfelt gratitude to so many in the Mets organization for not only the last two seasons as manager, but for the last 16 years in a variety of roles,” Rojas said in a statement released by the team.

“We live in a results-oriented business, and am deeply disappointed for our staff and fans that we didn’t reach our goals this season,” he said.

The Mets said Rojas has been offered the opportunity to remain in the organization in a role still to be determined. The club said decisions about the coaching staff will be made in the next several days.

“The entire Mets organization is grateful for the dedication and devotion that Luis has exhibited over the last two seasons as manager,” team president Sandy Alderson said in the statement. “He has shown a great commitment to the Mets over many years in multiple capacities. These decisions are never easy, but we feel a change is needed at this time.”

Expected to challenge for the playoffs or even a pennant with $341 million newcomer Francisco Lindor at shortstop, New York led the division for 90 straight days despite a wave of injuries. Rojas drew praise for his steady hand and communication skills — even garnering mention as a potential Manager of the Year candidate.

But then everything fell apart over the final two months of the season.

With ace pitcher Jacob deGrom sidelined since the All-Star break by a sprained elbow, New York went into a nosedive once August arrived. The lineup languished even when healthy, and an overtaxed pitching staff started to crack.

Lindor missed more than five weeks in the second half with an oblique injury and didn’t emerge from his season-long slump until too late. Michael Conforto, Jeff McNeil, Dominic Smith and James McCann also flopped at the plate, leaving Pete Alonso to carry the load.

An untimely 2-11 stretch against the Dodgers and Giants, baseball’s top two teams, dropped the Mets from five games over .500 and tied for first place to 62-66 and 6½ games out on Aug. 26. In a middling division, they lost the lead for good on Aug. 14 and never really recovered.

Rojas made a series of questionable in-game decisions down the stretch, and the collapse was complete when the Mets were eliminated from postseason contention Sept. 25 with more than a week remaining. They limped to the finish line of their fourth losing season in five years, and 10th in the last 13. New York has made the playoffs twice in the past 15 seasons, advancing only in 2015 on the way to a World Series appearance.

As losses piled up, Rojas’ fate seemed sealed before the season was over. New York went 26-34 during his first year at the helm, finishing tied for last place in the pandemic-shortened 2020 campaign.

“I enjoyed my time here the last two years being the manager,” Rojas said last week, the writing already on the wall. “It’s been fun every day just working with the guys and connecting with them and preparing. We haven’t achieved what we wanted to achieve.”

Rojas was swiftly elevated to skipper in January 2020 by former general manager Brodie Van Wagenen as the replacement for Carlos Beltran. The promotion came just days after Beltran was fired without managing a single game as part of fallout from the Houston Astros’ 2017 sign-stealing scandal.

With only one big league season under his belt as New York’s quality control coach, Rojas became the team’s fourth manager in 2½ years — and third in four months. The move was applauded by veterans and young Mets players alike, including those such as Alonso who played for Rojas in the minors.

Rojas has worked in the Mets’ organization since 2007 and spent eight years as a minor league manager. His father is former Expos and Giants skipper Felipe Alou, and his brother is ex-big league outfielder Moises Alou.

Rojas turned 40 on Sept. 1 and was the second-youngest manager in the majors, 24 days older than Minnesota’s Rocco Baldelli.

“It was fun playing for him,” Lindor said. “I like him a lot. He brings a lot to the game. One of the biggest messages that he brought this year was to be fearless.”

Next up, Alderson and Cohen plan to search for a president of baseball operations — and that individual is likely to be tasked with hiring the new manager.

The Mets initially intended to bring in a president of baseball operations last offseason, but were unable to interview top targets employed by other clubs, and at least one wasn’t interested in coming to New York.

So the Mets changed course, hiring Jared Porter as general manager to lead baseball operations under Alderson. Porter was soon fired after revelations that he sent unwanted, sexually explicit text messages and images to a female reporter in 2016 while working for the Cubs.

Zack Scott was promoted to acting general manager, then placed on paid administrative leave in early September after being arrested Aug. 31 on a charge of driving while intoxicated. Since then, Alderson, 73, has been filling the role of GM.

Scott pleaded not guilty to the DWI charge and three traffic violations. He is due back in White Plains City Court on Thursday.