Before the army began its assault, the Taliban were reported to be controlling territory less than 100 kilometres from the Pakistani capital, Islamabad.
The Pakistani public has on the whole been fully behind the army's military campaign, in contrast to the country's media, which had been at best ambivalent about the fight against the Taliban.
However, many parts of the media are changing their attitude.
One of the most significant turning points was when private television channels showed mobile phone footage of a teenage girl being held down and flogged by the Taliban in the Swat Valley.