Srinagar: Authorities in Kashmir on Wednesday freed a prominent rights activist, who had been detained for two and a half months, after a court ruled his arrest was illegal.

Khurram Parvez, 39, was released from prison nearly a week after a court in the region’s main city of Srinagar ordered him freed, saying that authorities had abused their powers and arrested him arbitrarily.

“Khurram Parvez was formally released from police custody ... He was set at liberty after 76 days of incarceration, following the quashing of his preventive detention by the High Court,” Parvez’s group, the Jammu-Kashmir Coalition of Civil Society (JKCCS), said in a brief statement.

Indian police arrested Parvez in September at the peak of deadly protests.

The territory has been roiled by unrest with more than 90 people killed since July 8 when a young militant leader was shot dead by Indian soldiers, making it one of the deadliest bouts of violence in decades.

Parvez was accused of being a threat to peace and was imprisoned under the Public Safety Act, which allows authorities to detain anyone for up to two years without trial.

His group has campaigned for decades against the controversial security law and has exposed alleged widespread rights abuses by security forces deployed in the region, who are granted legal impunity.

Many international rights bodies, including UN Rapporteurs, had campaigned for his release. Parvez said he was happy to be back with his family and vowed to continue defending human rights.

“I won’t let this difficulty make me bitter, instead my resolve for peace and justice has got strengthened,” he said in a statement posted on his personal Facebook page.

Before his imprisonment authorities at the airport in New Delhi barred Parvez from boarding an aircraft to Geneva where he was scheduled to address a meeting of the UN Human Rights Council.

He was arrested on his return home to Srinagar from Delhi.