Also headed to Pittsburgh in the deal are pitcher Stolmy Pimentel, infielder Ivan De Jesus and first baseman/outfielder Jerry Sands. Along with Hanrahan, the Red Sox also received infielder Brock Holt.
News that the Red Sox and Pirates were close to a deal broke earlier this week and the teams made the transaction official after the Christmas holiday.
The 31-year-old Hanrahan saved a total of 76 games over the last two seasons for the Pirates and is a year away from free agency. With incumbent closer Andrew Bailey still a question mark after a season in which he was injured for most of the year, then pitched ineffectively, it makes sense that the Sox would explore bullpen upgrades.
Hanrahan, an All-Star in each of the last two seasons, earned $4.1 million in 2012 and can expect a significant bump in salary arbitration, to close to $7 million.
He would join a formidable corps of relievers that could include Bailey, Koji Uehara, Alfredo Aceves, Junichi Tazawa, Franklin Morales, Andrew Miller and perhaps Daniel Bard, if the righthander can regain his old form.