Mets manager Terry Collins resigned Sunday after seven seasons and said he will take a position in the team's front office.

"It's been a blast, but it's time," the 68-year-old Collins said.

Collins announced he was stepping down after the Mets lost to Philadelphia 11-0, finishing a 70-92 season that began with great expectations but was quickly derailed by injuries.

"It's one of those years you want to forget, and I will. Tomorrow," he said, saying this season left a "sour taste."

The Mets were 551-583 overall under Collins, reaching the World Series in 2015 and earning an NL wild-card spot in 2016.

Collins was the oldest manager in the majors and recently said he had no plans to retire after this season. His two-year contract was set to expire after this year. He managed the Mets longer than anyone else.

Collins has managed 13 years in the majors with Houston, the Angels and Mets, going a combined 995-1,017.

"I did it a long time," he said.

When Collins and Phillies manager Pete Mackanin exchanged lineup cards at home plate, the two men hugged before walking away.

It was announced on Friday that Mackanin would not return as Phillies manager in 2018. Instead, he will transfer to a front office role as senior adviser to general manager Matt Klentak.

A couple fans at Citizens Bank Park held up signs thanking Collins for his efforts.

The New York Post reported last Wednesday that longtime Mets pitching coach Dan Warthen, who predates even Collins on the staff, is likely to be let go. And in the past few days, things turned particularly ugly amid anonymously sourced reports of sniping by players and friction between Collins and the front office - partly over how he's handled the bullpen.

"Terry's a great person. He's helped me out a lot through my baseball career," catcher Travis d'Arnaud said after the Mets' home finale Wednesday. "He's been a tremendous help for me. He's an amazing person. Fiery person, and definitely molds a lot of players and brings out the fire in a lot of guys."

Collins ranks second to Davey Johnson (595) among Mets managers in wins.

General manager Sandy Alderson is finishing up a three-year contract but is widely expected to return even though the injury-ravaged Mets dropped out of the NL East race early this year.

Two years ago, Alderson and Collins directed New York to its first pennant since 2000. Alderson was diagnosed with cancer that fall and had surgery, but he kept working full-time while undergoing chemotherapy treatments. He turns 70 in November.

After beginning 2017 with World Series ambitions that certainly seemed legitimate, New York instead slogged through its worst season this decade. By mid-to-late August, Alderson had traded away a string of veteran regulars who can become free agents in the offseason, including Jay Bruce, Lucas Duda, Curtis Granderson, Addison Reed and Neil Walker.

All were shipped to playoff contenders in exchange for minor leaguers. Alderson also acquired reliever AJ Ramos from Miami for two prospects just days before the July 31 trade deadline. In total, the moves shaved $10.3 million off New York's $156 million opening day payroll.