Parliament amended the constitution to renew secret army courts that try civilians charged with terrorism offences in a move seen by rights groups as failing natural justice.
Pakistan's Senate on Wednesday voted in favour of reinstating military courts for two years, Dawn newspaper reported. The courts try civilians charged with terrorism offences.
The move came a day after the lower house of parliament approved an amendment to the constitution providing legal cover to the military courts.
Activists warn that reinstatement of the courts could lead to human rights abuses.
The government and Pakistan's military say that the country's civilian judicial infrastructure is ill-equipped to deal with terrorism 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 that killed 134 children at a military-run school.
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.
Fails natural justice
Judicial experts have argued that the courts do not address the problem of terrorism, and instead act as a stop-gap measure for a criminal justice system badly in need of reform.
Prime Minister Nawaz Sharif's office said in January that it would seek to keep the courts in place after their initial two-year mandate expired.
However, Sharif's ruling PML-N was not able to extend the courts' tenure on its own as it did not have the two-thirds majority required to amend the constitution, leading to two months of negotiation 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 said.
Lawmakers from the Jamiat-i-Ulema Islam-Fazl (JUI-F) abstained from voting on the bill, saying they had reservations regarding its legal language, specifically with the phrase "terrorism in the name of religion," Dawn reported.