Pakistani Taliban's current chief Maulana Fazlullah had earlier controlled the area since 2007 and the military had launched an operation and was able to wrest it back in 2009.
Under the Taliban control, the area had become infamous for beheadings, violence and attacks on girls' schools. Though the Army had won over the area in 2009, it maintained a large presence in the area.
Malala was shot at by the Taliban in Swat in 2012.
"The prime minister lauded the role played by the army in bringing peace and stability to the area," it added.
Also Read
Sharif gave his approval during a briefing given to him.
Military spokesperson Maj Gen Asim Bajwa tweeted, saying Sharif "praised Army's gains in operations. Acknowledged Army's efforts in bringing peace".
Sharif had visited the de-radicalisation centre at Sabawoon in Mingora, Swat. The centre is rehabilitating the youth of the affected areas of Swat. According to Maj-Gen Bajwa, over 2,200 youth have been reintegrated into the society till now.
"I wish that this programme is extended to other parts of the country as well, where the youth has adopted such path and needs attention. They should be made healthy members of the society through constructive engagement.
"They are not enemies of Pakistan but have lost their direction," he added.
Nawaz commended the armed forces for restoring peace in the area and completing the reconstruction of schools, hospitals, roads and bridges in collaboration with the civic administration and the people. He said their services would be remembered for long.