Left-handed pitcher Wade Miley signed a contract extension with the Boston Red Sox on Thursday, avoiding arbitration.

According to the Boston Globe, the deal is for three years and $19.25 million with an option for 2018 that is worth $12 million but could go up to $14 million. The option has a buyout of $50,000. Miley will get a $50,000 signing bonus. This year he will make $3.5 million and next year he will make $6 million and in 2017 he will make $8.75 million.

Miley was acquired by the Red Sox in December in a trade with the Arizona Diamondbacks. Last season he was 8-12 with a 4.34 ERA with the Diamondbacks, according to ESPN. In his four year career Miley is 38-35 with a 3.79 ERA. He is viewed as a mid-rotation starter by most evaluators.

Miley is the third new starter in the Red Sox rotation. He joins Rick Porcello and Justin Masterson as the new Red Sox pitchers. Clay Buchholz and Joe Kelly are the other pitchers in the Red Sox rotation.

This season will be Miley’s first season playing in the American League. He had spent his entire career with the Diamondbacks until the trade. The Red Sox were 71-91 last year and finished in last place in the AL East.