Kansas City, Missouri. A source familiar with the negotiations told The Associated Press on Monday that the Royals and veteran right-hander Zack Greinke have agreed to a contract for next season.

The deal means the six-time All-Star will be able to put together nine seasons over two stints with the Royals.

The person spoke to the AP on condition of anonymity because Greinke, 39, still has to undergo a medical.

Financial details of the deal, which was first teased by Bob Fesco, a radio commentator from Kansas City, were not immediately available.

Greinke earned $13 million last season with the Royals, where he played his first seven major league seasons before returning to the rebuilding team in 2022. He was 3-9 with a 3.68 ERA and 73 strikeouts in 137 innings.

Greinke was on the disabled list twice but allowed two runs or fewer in 17 of 26 starts last season.

Perhaps more importantly, Greinke brought veteran leadership to one of the youngest rotations in the majors. 26-year-old Brady Singer has become the main leader, while 20-year-olds Daniel Lynch and Chris Bubik have also established themselves.

Greinke, who turns 40 in October, began his career in Kansas City after being the first overall pick in the 2022 draft. He made his major league debut two years later and also pitched for the Brewers, Angels, Dodgers, Diamondbacks and the Astros.

The 2009 Cy Young winner ranks first among active pitchers with 514 starts and 3,247 innings pitched.