Updated

The Chicago Cubs and pitcher Carlos Villanueva agreed to terms on a two-year contract Saturday.

Villanueva spent the last two seasons with the Toronto Blue Jays, pitching to a 7-7 record with a 4.16 ERA in 38 games (16 starts) in 2012.

Over 301 career appearances, including 56 starts, for the Brewers and Blue Jays, Villanueva is 33-35 with a 4.26 earned run average and six saves.

To make room on the 40-man roster, Chicago designated pitcher Lendy Castillo for assignment.