The New York Mets didn't let their All-Star closer stay on the free agent market too long, as Edwin Diaz has finalized a deal that gives him the richest contract for a reliever in MLB history.

Diaz and the Mets agreed to a $102 million contract over the next five seasons, according to multiple reports.

It also includes an $18 million signing bonus, according to the New York Post.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Edwin Diaz salutes crowd

Edwin Diaz of the New York Mets leaves the game during the eighth inning against the San Diego Padres in Game 2 of the wild-card playoff series at Citi Field on Oct. 8, 2022, in New York City. (Elsa/Getty Images)

This deal for Diaz tops the one that Aroldis Chapman signed with the New York Yankees for $86 million total.

The deal for Diaz knocks out one of their large free agents hitting the market, which includes Jacob deGrom, Chris Bassitt (who opted out of his $19 million tab for next season) and Brandon Nimmo. 

SPORTS RADIO LEGEND CHRIS RUSSO UNLEASHES EPIC TIRADE ON METS' COLLAPSE, BUCK SHOWALTER, ANALYTICS

And Diaz earned himself this contract after putting up his second All-Star season, his first with the Mets. He pitched to the tune of a 1.31 ERA in 61 regular-season games (62.0 innings), totaling 32 saves and collecting 118 strikeouts with his triple-digits fastball and wipeout slider. 

Diaz will be 29 years old next season, and the Mets are confident he can continue to pitch well in the New York market that is always hypercritical of their teams. 

Edwin Diaz reacts after save

Edwin Diaz of the New York Mets reacts after pitching the final out against the Philadelphia Phillies at Citi Field on Aug. 13, 2022, in New York City. (Sarah Stier/Getty Images)

They were critical of Diaz to start his Mets career after then-GM Brodie Van Wagenen acquired the closer and Robinson Cano from the Seattle Mariners. Diaz struggled mightily with a 5.59 ERA in 2019 before settling down in the shortened 2020 season with a 1.75 ERA.

MAX SCHERZER REACTS TO METS' ELIMINATION: ‘IT’S A KICK IN THE B---S'

But once fans were back in the building, the ERA went up yet again. He finished the 2021 campaign with a 3.45 ERA, though he collected 32 saves.

Whenever his walk-out song, "Narco," played this season, though, Mets fans knew exactly what to expect when Diaz graced the mound: strikeouts and wins. And that’s what usually transpired. 

Edwin Diaz celebrates vs Dodgers

Edwin Diaz of the New York Mets during the eighth inning against the Los Angeles Dodgers at Citi Field on Sept. 1, 2022, in New York City. (Jim McIsaac/Getty Images)

CLICK HERE TO GET THE FOX NEWS APP

The Mets still have some work to do as owner Steve Cohen will likely continue to flex his financial muscle to set up the Mets, who won 101 games last season but fell short to the San Diego Padres in the wild-card round, for success in 2023 and beyond.