Police in Canada have arrested two men in connection with the death of a 17-year-old girl who died after a photo of her allegedly being raped by four boys was shared online.

Rehtaeh Parsons was taken off life support on 7 April, two days after she was found hanged in the bathroom of her home in Halifax, Nova Scotia.

It had been alleged the girl attempted suicide after being tormented for more than a year after a photo of an alleged attack at a house party in November 2011 circulated around her school.

Police investigated allegations of sexual assault at a party in Cole Harbour but said there was insufficient evidence to charge anyone.

The case was eventually re-opened following public outcry that no one had been arrested in connection with the alleged incident.

Hacktivist group Anonymous even got involved in the case, warning police they would reveal the identity of the four boys alleged to have taken part in the attack if they took no legal action.

Royal Canadian Mounted Police (RCMP) Cpl Scott MacRae has said they have now arrested two males. Investigators said they are being questioned and no further information will be released at this time, including which offences they have been arrested for.

"We do have a 24-hour window to either release them or lay criminal charges," MacRae said.

Police in April said a person provided new information in the Parsons case and was willing to verify who the suspects are.

Leah Parsons, Rehtaeh's mother, said the family is hopeful charges will be brought.

"I feel that the investigation wasn't handled properly from the beginning and I've never seen the file, so I don't really know why or how that happened," she said. "I'm just glad that it was reopened, and I'm really happy that they have two people to question."

Rehtaeh's death prompted the Nova Scotia government to launch reviews of the RCMP's original investigation and the school board's handling of the matter.

Anonymous previosuly called for a protests outside the headquarters of the Royal Canadian Mounted Police (Reuters)
Anonymous previously called for a protests outside the headquarters of the Royal Canadian Mounted Police (Reuters)

Following the worldwide attention Rehteah's death gained, the father of the 17-year-old, Glen Canning, publicly thanked Anonymous for helping to get the case re-opened.

In a blog post, Canning wrote: "I want to say thank you to Anonymous for getting involved in my daughter's case. Thank you for being the driving force behind the new information that came forward and thank you for your continued support for bringing the four men who raped and ultimately murdered my daughter to justice.

"I won't forget this."

Parsons' death has been compared to similar cases in the US. In California, 15-year-old Audrie Pott killed herself in September 2012 eight days after she was allegedly sexually assaulted by three boys, who spread a photo of the alleged incident around her school. Three people were later arrested.

In another case involving Anonymous Ma'lik Richmond, 16, and Trenton Mays, 17, were convicted of assault and each sentenced to at least a year in juvenile detention in connection with the multiple rape of a girl by high school footballers in Steubenville, Ohio. Anonymous said more people deserved to be charged with the attack and accused the local authorities of orchestrating a cover-up.

Read: Rehtaeh Parsons Suicide: Two Charged with Distributing Child Pornography