New York Yankees closer Aroldis Chapman opted for a contract extension instead of free agency, agreeing Saturday to a deal that will keep him with the Yankees through the 2022 season, sources told ESPN.

Chapman, 31, could have opted out of the final two years of his contract with the Yankees and become a free agent this winter. Instead, the Yankees agreed to add another year for $18 million to the end of the next two years, which were due to pay him $30 million.