KARACHI, Pakistan (Reuters) - Pakistan’s parliament on Tuesday amended the constitution to reinstate secret military courts that try civilians charged with terrorism offences, something activists have warned will lead to human rights abuses.

The government and Pakistan’s powerful military say the country’s civilian judicial infrastructure is ill-equipped to deal with such cases, partly as judges fear becoming victims of revenge attacks by militants.

Military courts were first set up by the parliament in early 2015 in response to an attack by Pakistani Taliban fighters on a military-run school that killed 134 children.

Under the system, defendants are not allowed to hire their own lawyers, instead being assigned one by the military. There is no access for the media and the venue and timing of the trials is withheld until a verdict is announced by the military.

The courts have delivered 275 convictions, including 161 death sentences, and carried out 17 executions. These courts do not allow the right to appeal and judges are not required to have law degrees or provide reasons for their verdicts.

Prime Minister Nawaz Sharif’s office said in January that it would seek to keep them in place after the two-year legal mandate expired.

However, Sharif’s ruling PML-N was not able to extend the courts’ tenure on its own as it does not have the two-thirds majority required to amend the constitution, leading to two months of consensus building between the major parties.

“The bill has been adopted today, our suggestions including the parliamentary oversight of the military courts have been included in the bill,” Senator Saeed Ghani, from the opposition Pakistan Peoples Party, told Reuters.

Judicial experts have argued that the courts do not address the problem, with a criminal justice system badly in need of reform, and instead act as a stop-gap measure.

“The worrying thing is the conviction rate and the lack of representation for people being tried. It fails every single test of natural justice,” Furkan Ali, a lawyer, told Reuters.