The Pakistan government will hand over security of the capital Islamabad to the army from the beginning of next month, it was announced on Friday.
The army is being called under article 245 of the constitution which authorises the civilian government to deploy the armed forces to maintain law and order in the country.
Interior Minister Nisar Ali Khan told media outside the parliament house that the army will stay in the capital for three months from August 1 to the end of October.
He said Prime Minister Nawaz Sharif had decided on July 4 to deploy army to maintain security at key places in the country.
Article 245 which deals with the functions of the armed forces states says that "armed forces shall, under the directions of the federal government, defend Pakistan against external aggression or threat of war, and, subject to law, act in aid of civil power when called upon to do so".
The decision will give the army control over Islamabad's law and order situation ahead of a key protest march announced by Pakistan Tehreek-e-Insaf (PTI) chief Imran Khan on August 14.
It is widely believed that the decision to invoke article 245 was taken to thwart the rally of Imran who threatened on Thursday that the march would seal the fate of the government. Khan is protesting over alleged rigging in last year's general election.
After several small rallies during the previous months to force the government for a recount of at least four selected national assembly seats which his party lost in 2013, he has given the call for a major protest in the capital.
The Sharif government has so far reacted in panic to the threat from Imran's party.
Initially, it planned to organise month-long celebrations in August and a big function in front of the parliament house on August 14, Pakistan's independence day.
As Imran and his party have refused to budge and have announced to hold the rally at the same venue, the government has now announced to hand over security to the armed forces.
Nisar tried to play down the threat of Imran's march and said the government has not taken any decision to let PTI hold the rally, as the organisers had so far not sought formal permission for the event in the capital.