Chief Justice Dost Muhammad Khan at Peshawar High Court said that the provincial government should not take any decision in haste as it can create legal complications.
He observed that Khyber Pakhtunkhwa and federal government should take a joint decision about the troops' pullout from Malakand Division.
The Chief Justice also directed the provincial government to consult Interior Ministry and Army in connection with the withdrawal of troops.
He added that Army has been deployed to maintain peace and there is no harm if it stays longer for the same purpose.
More From This Section
However, a day after the announcement, Maj Gen Sanaullaha along with a Lt Col and a soldier were killed in a Taliban attack in the same area where withdrawal was being proposed.
The province is ruled by Pakistan Tehrik-e-Insaf of cricketer-turned-politician Imran Khan.
Imran is a strong supporter of talks and has called for a ceasefire.
The government's plan to hold talks with the Pakistani Taliban and other militant groups has been criticised by many security analysts here and by large sections of the media.
Besides the brazen attack, the Taliban had demanded the release of over 4,000 prisoners and withdrawal of army from tribal areas.
Army chief Gen Ashfaq Parvez Kayani has said that terrorists will not be allowed to take advantage of the peace process through political initiative.