The New York Mets have reached an agreement with free-agent reliever Dellin Betances on a one-year contract with a player option for 2021.

The Mets announced the deal with the four-time All Star on Tuesday. Betances is guaranteed $10.5 million under the contract.

The 31-year-old, who is from New York, is staying in his hometown after spending his first eight seasons in the majors with the Yankees.

He missed most of 2019 because of various injuries. Betances’ season ended after just eight pitches. He tore an Achilles tendon in his first appearance back from a lat injury that had sidelined him since spring training.

Betances was the first reliever in baseball history to have 100 or more strikeouts in five consecutive seasons (2014-2018). The right-hander led all major league relievers in strikeouts in each year from 2014-2016.

“Dellin is one of the elite relievers in the game with an incredible track record of pitching on the biggest stage and in playoff games,” Mets general manager Brodie Van Wagenen said in a statement.

In 2018, Betances made 66 appearances, with a 2.70 ERA and 115 strikeouts in 66 2/3 innings. He has made nine career playoff appearances, with a 3.27 ERA and 17 strikeouts in 11 innings.

“I love New York,” Betances said. “I grew up in Manhattan. Went to high school in Brooklyn. Played minor league ball in Staten Island. Made it to the big leagues in the Bronx. Now, I’m excited to go win a World Series with the Mets in Queens.”

To make room on the 40-man roster, the Mets designated infielder Sam Haggerty for assignment.