NEW YORK -- He can entwine himself in franchise lore now, one of the homegrown stars who stayed. Jacob deGrom arrived in Flushing unheralded, a ninth-round Draft pick who forced his way up the organizational ladder. He became a postseason star and National League Cy Young Award winner. On Tuesday,

NEW YORK -- He can entwine himself in franchise lore now, one of the homegrown stars who stayed. Jacob deGrom arrived in Flushing unheralded, a ninth-round Draft pick who forced his way up the organizational ladder. He became a postseason star and National League Cy Young Award winner. On Tuesday, the Mets rewarded deGrom with one of the richest contracts in franchise history: a five-year, $137.5 million pact.

The deal, which replaces deGrom’s current contract, includes a $32.5 million club option for 2024 that could bring the total value to $170 million, plus an opt-out after 2022 and a full no-trade clause. The Mets announced the deal Tuesday afternoon, but the club did not disclose the financial terms.

“I really do enjoy playing in New York,” deGrom said recently. “The fans have treated me great. I enjoy taking the mound at Citi Field in front of them, and it’s rare that a guy spends his career with one team.”

The last time the Mets committed to such a player was in 2012, when they agreed to a $138 million pact with third baseman David Wright. That remains the franchise’s richest contract in terms of total dollars; the guaranteed portion of deGrom’s deal matches Johan Santana for second place. It also includes the largest average annual value in Major League history for a player drafted lower than 11th overall.

“This is a tremendous day for Jacob, his family, our fans and the entire Mets organization,” Mets COO Jeff Wilpon said in the press release announcing the deal. “Last year, Jacob had one of the most remarkable seasons in baseball history and we are excited to be able to reward him. Mets fans can celebrate knowing their ace will remain in Flushing.”

More important, the contract assures deGrom will stay with New York at least through age 34, and potentially through 36. A ninth-round Draft pick in 2010, deGrom burst onto the scene and was the 2014 NL Rookie of the Year, adding three postseason wins the following October. Since that time, he has shorn his once-trademark hair and blossomed into one of the most successful pitchers in franchise history, producing a 2.67 career ERA that ranks second only to Hall of Famer Tom Seaver. deGrom is also 15th in wins, ninth in strikeouts and seventh in pitcher wins above replacement.

Much of that production occurred last season, when deGrom went 10-9 with a 1.70 ERA and 269 strikeouts, making his second All-Star team, winning the Cy Young Award and finishing with an active streak of 24 consecutive quality starts. It was during the All-Star break that deGrom’s agent at the time, Brodie Van Wagenen, publicly stated his desire for the Mets to sign or trade their ace, setting off a flurry of news stories that did not ultimately lead to action. deGrom continued pitching, entering the offseason with two remaining years of team control, and Van Wagenen became the Mets’ general manager in October.

Unwilling to let any contract uncertainty extend into another regular season, deGrom’s camp announced in February that he was setting an Opening Day deadline for talks. Around the same time, the market for extensions began superheating; among those who agreed to deals were pitchers Justin Verlander, Blake Snell and Chris Sale, whose five-year, $145 million contract with the Red Sox seemingly set the benchmark for deGrom’s contract. Sale’s pact also includes an opt-out after the 2022 season, setting up him and deGrom to be potential highlights of the 2022-23 free-agent class -- though deGrom, at this point, appears more interested in being a Met for life.

"The future is definitely something that I would like to be a part of,” deGrom said earlier this spring. “That was a goal of mine.”

With deGrom’s future secure, the Mets could consider extending some of their other young stars, including pitcher Noah Syndergaard, outfielders Michael Conforto and Brandon Nimmo and shortstop Amed Rosario, who represent the team’s present and future core. It was Syndergaard who, before departing Spring Training last weekend, implored the Mets to “quit all this fuss and pay the man already.” The Mets did, agreeing to terms with deGrom two days later, and two days in advance of his Opening Day start Thursday against the Nationals.