NEW YORK (AP) — Zach Britton is staying with the New York Yankees, agreeing to a $39 million, three-year contract, a person familiar with the negotiations told The Associated Press.

The person spoke on condition of anonymity Saturday night because the agreement was subject to a successful physical. Britton has the right to terminate his deal after two seasons and become a free agent again.

A 31-year-old left-hander, Britton was acquired by the Yankees from Baltimore on July 24 and had a 2.88 ERA and three saves in 25 appearances for New York,

He serves as setup man for closer Aroldis Chapman along with Dellin Betances, Chasen Shreve, Chad Green and Jonathan Holder. New York’s bullpen was weakened by the departure of right-hander David Robertson, who agreed to a $23 million, two-year contract with Philadelphia.

Britton began the season on the disabled list after tearing his right Achilles tendon in December. He made his season debut on June 12 and was 1-0 with a 3.45 ERA and four saves in 16 games with the Orioles.

His average fastball velocity with the Yankees was in the 95-96 mph range.

Britton was drafted by the Orioles in 2006 and worked his way up the team’s minor league system before landing in the big leagues in 2011. He is a two-time All-Star and led the AL with 47 saves in 2016.

(© Copyright 2019 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)