Pakistan has voted in favour of military trials for terrorism suspects, following December's attack by the Pakistani Taliban (TTP) on a military-run school that killed 148 people, mostly children.
The bill secured the vote of 242 politicians from the lower house of parliament on Tuesday, 14 more than the two-thirds majority it required.
However, several politicians from religious parties and Imran Khan's opposition Tehreek-e-Insaf party abstained.
|How will Pakistan deal with armed groups?
The bill is now expected to be passed by the upper house and signed into law by the president this week.
Nawaz Sharif, Pakistan's prime minister, announced 25 new counter-terrorism policies last month, in the wake of the TTP attack on a military-run school in Peshawar that killed 134 children and 16 adults.
Sharif also ended a six-year moratorium on the death penalty in terrorism cases.
Critics have argued that quick-fix measures such as military courts or reinstating the death penalty do little to improve the legal process.
The leading English-language newspaper Dawn called it a "sad day" in an editorial. It accused political leaders of being unable to defend the country's constitutional and democratic roots or resist the "generals' demands".
"Yes, we need a coherent strategy to fight militancy and political and military leaders to work together. But military courts are not the answer," Dawn said.
The TTP said the attack was in retaliation for an ongoing Pakistan Army operation n the North Waziristan tribal area that had killed many of their family members.