Boston, MA (Sports Network) - Boston Red Sox pitcher Joel Hanrahan will miss the remainder of the season after undergoing surgery for a torn flexor muscle tendon in his right arm.

Hanrahan left Monday's game against Minnesota and tests revealed the damage. He visited Dr. James Andrews for a second opinion and the noted sports surgeon concurred with the original diagnosis.

Andrews will perform the operation some time next week. There is no timetable for Hanrahan's return, although a 6-to-9 month recovery period is normal for the flexor tendon. However, if ligament damage is also determined, a Tommy John procedure could extend the recovery time.

The 31-year-old right-hander appeared in just nine games for the Red Sox this season, his first with the club after developing into a reliable closer with Pittsburgh over the past two years. He was 0-1 with four saves and a 9.82 ERA in his limited action in 2013, having missed the final two weeks in April with a hamstring strain.

Hanrahan, set to become a free agent after the season, converted 76 saves in 84 opportunities over the past two years for the Pirates. He is 22-18 with 100 saves and a 3.85 ERA in 362 games, all but 11 out of the bullpen, during a seven-year career with Boston, Pittsburgh and Washington.