Armas gets $3 million this year, and the deal includes a $5 million mutual option for 2008 with a $500,000 buyout. His 2008 salary can increase depending on his performance this year.
The Pirates expect to begin the season with four left-handed starters and have spent much of the offseason looking for a right-hander to compete for the No. 5 spot with right-hander Shawn Chacon.
The 28-year-old Armas was 9-12 with a 5.03 ERA in 30 starts with the Washington Nationals last season. He made his major-league debut with Montreal in 1999 and has a 48-60 record and a 4.45 ERA in 151 career starts.
Armas was 12-12 with a 4.44 ERA in 29 starts for Montreal in 2002. He was limited to five starts a season later after developing a shoulder injury but has made 65 starts over the last three seasons.
Armas is the son of former Pirates outfielder Tony Armas, who made his major-league debut in 1976 before being traded to Oakland in the Phil Garner deal before the 1977 season. The elder Armas went on to hit 251 homers in 13 seasons with the Athletics, Red Sox and Angels
To make room on their 40-man roster for Armas Jr., the Pirates designated right-handed pitcher Franquelis Osoria for assignment.