The decision was reached at a marathon meeting of leaders of all political parties led by Prime Minister Nawaz Sharif and the military leadership at the prime minister's House in Islamabad.
Minister for Information Pervaiz Rashid told media persons that leaders gave their consent to a constitutional amendment bill for creation of military courts.
"The bill will be presented in the National Assembly on Saturday and in the Senate on Tuesday and after it is passed by the two houses of parliament, it will become part of the Constitution," he said. He said that that the Army Act will also be amended.
Eminent lawyer Farough Naseem said that the leaders agreed that first army act should be amended to set up military courts and then constitution be amended to give legal cover to the changes made in the army act.
He said it was being done to preempt any action by the Supreme Court which in an earlier decision had already declared the setting up of Military Courts against the constitution.
Earlier, Prime Minister Sharif in his opening remarks said that time has come for final action against militants, as politicians differed over how to create military courts for speedy trial of militants.
"It is time for action against militants. Already a lot of discussion has been held on it," said Sharif.
"There is no room for further debate in the parliament," he said.
Sharif also said that adequate debate has taken place on the National Action Plan to deal with militancy which also suggested speedy trial of militants.
He said all political parties had played a major role in preparation of the National Action Plan for countering terrorism in the country.
Army chief General Raheel Sharif and ISI chief Lt-Gen Rizwan Akhtar also attended the meeting, as army put pressure on leaders to act fast for creation of military courts.
Friday’s consensus was reached after differences popped up over the method on how to set up such courts.
12 entrepreneurs who made news in 2014
Govt readies roadmap for new accounting standards
Kohli most popular cricketer on Twitter with over 5 million followers
Salman, Priyanka, Alia: INSIDE the Big Star awards
Pakistan's zero tolerance against terrorism dubious, says US expert