BOSTON (Reuters) - A Massachusetts man was sentenced on Thursday to more than 10 years in prison for carrying out a cyberattack on a hospital on behalf of the hacking activist group Anonymous to protest the treatment of a teenager in a high-profile custody dispute.

FILE PHOTO: A man types on a computer keyboard in this illustration picture February 28, 2013. REUTERS/Kacper Pempel/Illustration/File Photo

Martin Gottesfeld, 34, was sentenced by U.S. District Judge Nathaniel Gorton in Boston nearly three years after he was rescued from a disabled powerboat off the coast of Cuba by a Disney Cruise Line ship after fleeing the United States amid a federal investigation.

A federal jury in August found him guilty of two counts, including conspiracy to damage protected computers related to cyberattacks he carried out in 2014 on Boston Children’s Hospital and another facility.

“Make no mistake, your crime was contemptible, invidious and loathsome,” Gorton said.

Assistant U.S. Attorney David D’Addio called Gottesfeld a “self-aggrandizing menace” whose cyberattacks put children’s lives at risk and who could strike again once released from prison.

“It is terrifying to contemplate what he will do with the next cause he adopts,” D’Addio said.

Gottesfeld, who beyond serving 121 months in prison must also pay nearly $443,000 in restitution, has been in custody since February 2016. He said he planned to appeal but had no regrets.

“I wish I could have done more,” he said.

According to prosecutors, in late 2013, Gottesfeld, a computer engineer living in Somerville, Massachusetts, learned about a child custody dispute involving a Connecticut teenager, Justina Pelletier.

Pelletier had been taken into state custody in Massachusetts after a dispute over her diagnosis arose between her parents and Boston Children’s Hospital, which determined her health problems were psychiatric in nature and believed her parents were interfering with her treatment.

Her case garnered headlines and drew the attention of religious and political groups who viewed it as an example of government interference with parental rights.

Gottesfeld, who disagreed with the hospital’s diagnosis, began advocating online for her release, prosecutors said.

They said Gottesfeld in March 2014 launched a distributed denial-of-service (DDOS) attack on a residential treatment facility called Wayside Youth & Family Support Network where Pelletier was a resident after her discharge from the hospital.

DDOS attacks shut down or slow websites by flooding them with data.

Gottesfeld later in April 2014 launched a DDOS attack on behalf of Anonymous that disrupted Boston Children’s Hospital’s network for two weeks and interrupted internet services used to treat patients, prosecutors said.