SCOTTSDALE, Ariz. (AP) — Outfielder Darin Ruf agreed to a $6.25 million, two-year contract with the San Francisco Giants on Tuesday.

He will earn $3 million in salary both this season and next. The deal, which avoids arbitration, includes a $3.5 million club option for the 2024 season with a $250,000 buyout.

The 35-year-old Ruf batted .271 with 16 homers and 43 RBIs for the 107-win NL West champions last season.

Ruf is scheduled to make an annual donation to the Giants Community Fund — $15,000 in both 2022 and 2023 and $17,500 in 2024.

San Francisco also avoided arbitration by giving one-year contracts to catcher Curt Casali for $2.6 million, right-hander Dominic Leone for $2.25 million and outfielder Mike Yastrzemski for $3.7 million.

___

More AP MLB coverage: https://apnews.com/hub/MLB and https://twitter.com/AP_Sports