NEW YORK, NY - JULY 24: Joe Musgrove #44 of the San Diego Padres pitches during the first inning against the New York Mets at Citi Field on July 24, 2022 in New York City. (Photo by Adam Hunger/Getty Images)Adam Hunger/Getty Images

The San Diego Padres and starting pitcher Joe Musgrove have agreed on a five-year contract worth $100 million, per Jon Heyman of the New York Post.

Musgrove, who was scheduled to hit free agency next offseason, has gone 8-4 with a 2.65 ERA and a 0.98 WHIP in 18 starts this year. The 29-year-old has struck out 114 batters in 115.1 innings.

The seven-year MLB veteran earned his first All-Star appearance this season and serves as the ace of a Padres team that sits second in the NL West with a 57-46 record.

San Diego holds the second wild-card spot (and No. 5 seed) in the NL playoff bracket despite missing superstar shortstop Fernando Tatis Jr. all season with a fractured left wrist.

Musgrove has played for the Houston Astros, Pittsburgh Pirates and Padres during his career. Pittsburgh traded Musgrove to San Diego in January 2021 in a three-team deal also involving the New York Mets.

Musgrove, who grew up in San Diego County, has flourished for the Padres. He threw the franchise's first-ever no-hitter last season en route to an 11-9 record and a 3.18 ERA, 1.08 WHIP and a career-high 203 strikeouts.

The right-hander is on pace for an even better season this year as he looks to help guide San Diego to its second playoff appearance in three seasons.