Free-agent pitcher Jason Hammel and the Kansas City Royals reached agreement on a $16 million, two-year contract Sunday, a source told ESPN's Jim Bowden, confirming multiple reports.

The deal, pending a physical, includes a mutual option for a third year.

Hammel, 34, went 15-10 with a 3.83 ERA in 30 starts with the Chicago Cubs last season. Hammel did not pitch in the postseason. The Cubs declined Hammel's $12 million option for 2017, which made the right-hander one of the top starters on the free-agent market.

Jason Hammel is joining the Royals after reaching agreement on a two-year contract. Caylor Arnold-USA TODAY Sports

The Cubs acquired left-hander Mike Montgomery in a July trade with Seattle, and he could replace Hammel in the rotation.

In two seasons with the Cubs, the 6-foot-6 right-hander went 33-22 with a 3.59 ERA in 78 starts. Hammel first signed with the Cubs in February 2014 and went 8-5 with a 2.98 ERA in 17 starts that season. He was traded to Oakland in the deal that sent shortstop Addison Russell to Chicago. The pitcher then re-signed with Chicago the following December for $20 million for the 2015 and 2016 seasons.