The New York Yankees have agreed to terms with Matt Thornton on a two-year deal worth $7 million.

Thornton, 37, pitched to a 3.74 ERA with 6.2 K/9, 3.1 BB/9 in 43 1/3 innings for the Chicago White Sox and Boston Red Sox in 2013.

New York was in need of lefty reliever after Boone Logan signed with the Colorado Rockies.