The National Assembly passed unopposed two key amendment bills to set up military courts in the country.
The lower house of parliament adopted the 21st Constitutional Amendment Bill and the Pakistan Army (Amendment) Bill 2015 after 247 members, more than a two-thirds majority, voted in favour of the amendment.
Speaker Ayaz Sadiq said the constitutional amendment was passed without any member opposing it.
The Senate, the Upper house, passed the bills with 78 votes in favour and none against.
The Senate comprises 104 members and it passed the bill with more than the two-third majority required to amend the Constitution.
Both the bills were moved by Minister for Law and Justice Senator Pervaiz Rashid.
Speaking in the Senate, Prime Minister Nawaz Sharif spoke as to why it was necessary to pass the amendment bill.
"This bill is about military courts trying hardcore terrorists who kill Pakistanis...this is an important day for Pakistan when the nation decided that terrorists will be taken out from the roots," Sharif said.
"I want to thank all the party heads and their parliamentary representatives for attending committees and sharing their thoughts and advice on this highly important bill. This bill was created with the help of everyone's common agreement," he said.
"Through this bill, we can overcome the last 60 years of unrest which should have ended years ago. This bill will help us achieve that," Sharif said.
After nod by the Senate, the bills should be signed by the president to become laws and opening up way for setting up of the military courts.
The courts are being set up for two years and will become dysfunctional at the end of constitutional limit.
They will be staffed by serving military men but only federal government will be authorised to send a case for trial in these courts.
The two bills were expected to be passed on Monday but voting was deferred after the government fell short of the required two-thirds majority as only 218 members were present in the National Assembly of 342 members.
The decision to set up the military court was taken by the political parties after pressure mounted on the government and army to take solid action against militants in the wake of the Peshawar school attack last month which killed 150 people, including 134 students.
Pakistan announces Rs 10 million bounty for Taliban chief
Pak leaders agree to set up military courts to try terrorists
Why the Pakistan army can't subdue the TTP
Why Obama promptly accepted Modi's R-Day invite
Meet the Castros!