SAN DIEGO — The hometown kid is sticking around.

The San Diego Padres signed Joe Musgrove to a five-year contract extension, which will keep him on the team through the 2027 season, General Manager A.J. Preller announced Monday.

Musgrove, a right-handed pitcher, grew up in El Cajon in San Diego’s East County.

“You look at baseball and there’s so much uncertainty on where you might end up in your career and unlike a free agency deal where you get to select where you go, this happened to fall in my lap,” Musgrove said during a press conference Monday. “It’s kind of the last thing you expect to get to comeback and play in your hometown.”

Preller stated that Musgrove has “consistently performed at a high level over the last two seasons, throwing the first no-hitter in Padres history and becoming an All-Star.”

“He personifies a championship-level mindset and elevates the teammates around him. We’re extremely happy to have Joe as part of our core group moving forward as we work to bring a World Series title to San Diego,” Preller said.

Padres Chairman Peter Seidler added that Musgrove has been a “respected leader” within the San Diego community.

“I have a great feeling knowing that Joe will be an important and significant part of our organization for many years to come,” Seidler said.