After a rough first season in New York, Devin Williams is hoping for better results with a move across town.
The reliever, who arrived in The Bronx a year ago in a trade from Milwaukee and quickly lost his role as Yankees closer, is headed to the Mets, The Post confirmed.
The 31-year-old agreed to a three-year, $51 million deal — with some money deferred, according to The Post’s Jon Heyman.
Williams’ move to Queens doesn’t necessarily mean the end for Edwin Díaz with the Mets.
Díaz opted out of the final two years of his contract earlier in the offseason and is a free agent, but the Mets remain interested in keeping him, even with Williams, according to sources.
Díaz is coming off another stellar year with the Mets, fully recovered from the torn patellar tendon that cost him the 2023 season.
Still, he turns 32 in March and it’s unclear if the Mets are willing to give him a lengthy deal.
It will be another change of scenery for Williams, who was expected to lock down the closer role with the Yankees after starring with the Brewers, but instead struggled enough that he lost the job twice — and for good when they traded for David Bednar at the deadline.
Devin Williams, now a Met, throws a pitch for the Yankees. JASON SZENES/ NY POST
The move also reunites Williams with David Stearns, who was the Brewers general manager for most of Williams’ time in Milwaukee.
But the Mets won’t necessarily hand the ninth inning to Williams, who first landed in Mets lore when he allowed Pete Alonso’s series-altering homer in Game 3 of the 2024 wild-card series in Milwaukee.
Williams then went to the Yankees and initially fell on his face, pulled from the closer role in April with an 11.25 ERA over his first 10 appearances.
He got the closer job back in early June, but faltered again.
Williams recovered and pitched well in a setup role, especially in September, when he threw nine scoreless innings in nine appearances.
He followed that up with a solid showing in the postseason.
Williams ended the regular season with an ugly ERA of 4.79 — a career worst — and while his strikeout rate dipped, some other advanced metrics indicated Williams was a victim of at least some bad luck.
The Mets are betting on that being the case and on Williams being able to ultimately handle the spotlight.
After the Yankees were knocked out of the ALDS by the Blue Jays, Williams said he was “definitely open” to a return to The Bronx.
That’s hardly surprising for a prospective free agent, but he detailed why he’d be more prepared for what would be in store for him if he remained with the team — and in New York following six seasons in small-market Milwaukee.
“This place has definitely grown on me,’’ Williams said of The Bronx. “I appreciate the fans and their … eagerness to win.”
Delivering insights on all things Amazin’s
Sign up for Inside the Mets by Mike Puma, exclusively on Sports+
Thank you
Asked if that took time to get used to, Williams said, “It did, a little, but I would say that they’re fans and they just want to see their team win. That’s the job we have to do and I’d definitely be up for [coming back].”
While he won’t be returning to the Yankees, perhaps his season with them will ease the transition to Citi Field.
His signing is part of what’s already been a busy offseason for David Stearns, as the Mets have shaken up their coaching staff and traded Brandon Nimmo to the Rangers for Marcus Semien.
Yankees pitcher Devin Williams delivers to a Toronto Blue Jays batter in the seventh inning of Game 4 of the MLB American League Division Series SARAH YENESEL/EPA/Shutterstock
And Alonso, Williams’ former nemesis, also remains a free agent.
The Mets are looking to rebound from their historic collapse, with more help likely coming for the rotation. As Stearns said following the Nimmo trade, running it back with the same roster “wasn’t the right thing to do.”