NEW YORK (AP)Anthony Rizzo is staying with the New York Yankees, agreeing Tuesday to a $40 million, two-year contract, according to a person familiar with the negotiations.

The person spoke to The Associated Press on condition of anonymity because the agreement was subject to a successful physical.

Rizzo gets $17 million in each of the next two seasons, and the deal for the first baseman includes a $20 million team option for 2025 with a $6 million buyout. Rizzo had opted out of his previous contract with New York, giving up a $16 million salary for 2023.

Since joining the Yankees at the 2021 trade deadline, Rizzo had provided needed left-handed power for New York and has taken advantage of the right field short porch at Yankee Stadium.

Now 33, Rizzo hit .224 with 75 RBIs and had 32 home runs for the fourth time in his career. While the Yankees led the major leagues with 254 home runs, just 77 were by left-handed batters.

His agreement is the first major offseason move for the Yankees, who are attempting to re-sign star right fielder Aaron Judge.

AP MLB: https://apnews.com/hub/mlb and https://twitter.com/AP-Sports