SAN FRANCISCO (AP) — The San Francisco Giants and right-hander Alex Cobb agreed to a $20 million, two-year contract with a club option for 2024.

The team announced the deal Tuesday for the 34-year-old pitcher, who was 8-3 with a 3.76 ERA in 18 starts for the Los Angeles Angels last season. The 10-year major league veteran is 63-60 with a 3.87 ERA in his career.

Cobb will earn $9 million in 2022 and '23, and the club option is for $10 million with a $2 million buyout. Cobb will also make a $45,000 annual donation to the Giants Community Fund in each of his first two seasons and a $50,000 donation in 2024 if the option is exercised.

The club also reached agreements on one-year contracts with right-hander John Brebbia, left-hander Jarlin García and outfielder Austin Slater to avoid arbitration.

Brebbia is set to earn $837,500, García will make $1,725,000 and Slater $1.85 million.

Brebbia went 0-1 with a 5.89 ERA over 18 appearances. Fellow reliever García was 6-3 with a 2.62 ERA and one save in 58 outings for 107-win San Francisco.

Slater batted .241 with 12 home runs and 39 RBIs in 129 games.

The NL West champion Giants also announced Tuesday they declined to tender contracts for 2022 to right-hander Sam Delaplane, lefty Joe Palumbo and outfielder Luis Gonzalez.

___

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