LONDON — As a full Pakistani military offensive in the tribal district of North Waziristan took shape on Monday, commanders promised a crushing blow to the jihadi groups that have flourished there in the past decade, spreading chaos in the region and posing a security threat to the West.

Tanks rolled through the streets of Miram Shah, the district’s main town, as jet fighters pounded targets in a nearby valley and tens of thousands of residents fled to safer areas out of fear of an impending ground assault.

Pakistan’s army chief, Gen. Raheel Sharif, vowed to disrupt militant sanctuaries “without any discrimination” — a reference to the wide variety of militant groups, from the Taliban to Al Qaeda and the Haqqani network, that are based in North Waziristan and have drawn strength from their ability to share money, manpower and ideology.

But the looming battle will also be decided, experts and analysts said, in Pakistan’s major towns and cities, where the Taliban have threatened to exact violent retribution through mass mayhem. “By God, we will soon shake your palaces in Islamabad and Lahore and burn those to ashes,” the Taliban spokesman, Shahidullah Shahid, said in a statement on Monday.