Updated

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.

"(Andrews) basically walked in, looked at my arm, touched it, and said there really wasn't a decision," Hanrahan said on Saturday. "The flexor pretty much tore right off the bone. It wasn't really a decision. It's just a matter of what kind of surgery it was going to be. As of now, it's just going to be the flexor. When he gets in there and takes a look, it could be worse, it could be not as bad."

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.

"The way I look at it is surgery, the guys who are doing it these days and the (rehab) programs that they have, surgery is kind of like putting a Band-Aid on something," Hanrahan added. "They're so good at their job -- kind of like we are -- it kind of takes a lot of the worry out of everything. I'll stick with the programs they have and try to get healthy for next year."

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.