SAN FRANCISCO (AP)Sean Manaea and the San Francisco Giants finalized a $25 million, two-year contract Friday.

The left-hander gets a $5 million signing bonus, half each on March 15 in both 2023 and ’24, and salaries of $7.5 million next season and $12.5 million in 2024. He can opt out of the deal after the 2023 season and become a free agent again next fall.

Manaea adds another experienced arm to a rotation that includes Logan Webb, Alex Cobb and Alex Wood. All-Star lefty Carlos Rodon is leaving in free agency after agreeing with the New York Yankees on a $162 million, six-year contract that is pending a physical.

The 30-year-old Manaea spent his first six major league seasons with the Oakland Athletics. He went 8-9 with a 4.96 ERA over 30 appearances for San Diego this year, making 28 starts and throwing 158 innings in his lone campaign with the Padres under former A’s manager Bob Melvin.

San Francisco finished 81-81 for third place in the NL West after a franchise-best 107 wins and a division title in 2021 before losing the best-of-five NL Division Series in five games to the rival Dodgers.

Manaea will make an annual donation of $62,500 to the Giants Community Fund in both 2023 and 2024, the team announced.

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