The consensus was reached during a meeting of leaders of parliamentary parties, chaired by Speaker National Assembly Ayaz Sadiq, which ended the deadlock persisting for the past many weeks.
"An agreement on a two-year conditional extension was reached," Sadiq said, adding four out the nine recommendations put forward by the PPP were accepted and will be incorporated in the draft bill.
The recommendations which were agreed upon and will be incorporated in the draft bill include: Accused to be produced within 24 hours before the concerned court, accused to be supplied with grounds of arrest within 24 hours, accused shall have right to engage a counsel of his choice and provisions of the Qanoon-i-Shahadat 1984 (Law of Evidence) shall apply.
The PPP had earlier proposed a one-year term for the military courts. Other key conditions the PPP withdrew included the demand that military courts should be presided over by one sessions or additional sessions judge along with a military officer.
The PPP also withdrew the recommendation that right of judicial review by high courts under Article 199 of the Constitution should be given to an accused and high court shall decide case within 60 days.
Speaker Ayaz Sadiq said the amendments to the legislation will be tabled in the National Assembly on Friday (today), adding the bill regarding extending military courts for two years will be tabled on Monday to get it passed unanimously. The bill will be tabled in the Senate on Tuesday, he added.
He said that a national security committee comprising parliamentary leaders from National Assembly and Senate will be constituted to oversee military courts as well as other matters related to curbing terrorism in the country.
He said that Jamiat Ulema-e-Islam-Fazl (JUI-F) and the Jamaat-e-Islami had reservations regarding the legal language of the bill, specifically with the term "terrorism in the name of religion", adding the reservations of the two parties will be addressed in the final draft.
Leader of the opposition in Senate Aitzaz Ahsan who led the PPP delegation in the talks, said the government agreed on accepting four recommendations of the PPP that be incorporated in the draft bill.
"Pakistan is in a state of war. The enemy is attacking from everywhere," Ahsan said, adding the government showed flexibility on some issues which led to an agreement on extension of another two-year term to the courts.
About the formation of National Security Committee, he said that it was a longstanding demand of PPP chairman Bilawal Bhutto and hoped that the committee would work in its true spirit.
Finance Minister Ishaq Dar said that all the political parties have agreed to further amend the Constitution to revive military courts for another two-year term, adding it was a good development.
He said the decision was made in view of the fact that the country is fighting a war against terrorism, adding the oversight committee comprising parliamentary leaders of both the houses will plan a future line of action at the conclusion of the two-year period or the military courts.
Pakistan Tehreek-e-Insaf (PTI) leader Shah Mahmood Qureshi said all the political forces of the country have shown flexibility to extend military courts' term. He said spirit of the consensus is that any particular religious community will not be targeted.
He said that all the political parties showed flexibility on the matter and hoped that the law will not be used for political victimization.
The military courts set up in the aftermath of Army Public School (APS) attack in 2014, expired after their two-year period in January this year.