The Red Sox and lefty pitcher Wade Miley have agreed to a 3-year, $19.25 million dollar deal that includes a club option for a fourth year.

The Sox acquired the 28-year-old Miley from the Arizona Diamondbacks in exchange for Allen Webster and Ruby De La Rosa. It happened shortly after Jon Lester signed with the Cubs.

Miley was arbitration eligible this year.

The deal breaks down like this - Miley will get $3.5M this year, $6M in 2016 and $8.75M in 2017. The deal includes a signing bonus of $500,000 and more money in incentives.