DETROIT (AP) — Right-hander Logan Webb and the San Francisco Giants agreed Friday to a $90 million, five-year contract covering 2024-28.

The 26-year-old has a $4.6 million salary this season in his first year of arbitration eligibility and would have been eligible for free agency after the 2025 season. He gets $8 million next year, $12 million in 2025, $23 million each in 2026 and 2027 and $24 million in 2028. In addition, he would receive a $1 million one-time assignment bonus from the receiving team if traded.

Webb went 15-9 with a 2.90 ERA in 32 starts last year, striking out 163 and walking 49 in 192 1/3 innings. He is 0-3 with a 4.76 ERA this season heading into a scheduled start Sunday at the Detroit Tigers.

KRON On is streaming news live now

Webb is 31-22 with a 3.59 ERA in five big league seasons, striking out 426 and walking 126 in 451 2/3 innings.

As part of the agreement, he will make donations to the Giants Community Fund of $40,000 next year, $60,000 in 2025, $115,000 in 2026 and 2027 and $120,000 in 2028.