The Pakistani army is fighting a vicious battle against the Taliban in a war that many believe must be won if the very stability of a region deemed to be among the most dangerous on earth is to be guaranteed.
In Battle of Swat Valley, Panorama reporter John Sweeney gained access to the frontlines as the Pakistani military fights to reclaim a treacherous stretch of the country that has been under Taliban control.
It is, in the words of US President Barack Obama, "the most dangerous place on earth".
As Sweeney discovers, this is a war that combines 21st century firepower with medieval ideology and it is happening just 120km (75 miles) from the world's only Islamic nuclear bomb facility.
Sweeney joins a wave of helicopter gunships heading into fierce fighting to reveal what life is really like for those who were, until very recently, living under Taliban control.
The Pakistani army's goal is straight-forward: They intend to reclaim Swat's capital of Mingora and push north to the Taliban stronghold of Matta.
While witnessing the aftermath of atrocities too shocking for broadcast, Sweeney also asks whether Pakistan, despite all of its apparent determination, can win this war.
As one senior retired general told Panorama, Pakistan has everything to lose: "In a way it could be the beginning of civil war. So we have to fight for our future. It is a question of our life and death. We have to win."
In visiting Swat, Panorama follows Pakistan's long and complicated relationship with the Taliban - a relationship that the Pakistani government helped to create when it decided to support an extremist force that fought the Soviets in neighbouring Afghanistan for two decades.
That force became the Taliban and has gone on to take almost total control of this area of the tribally controlled North West Frontier Province of Pakistan.
That control came after a tacit agreement earlier this year with the democratically elected Pakistani government - a deal that was both deeply unpopular in the country and very quickly regretted by the government.
Retired Lieutenant General Talat Masood tells Panorama that the attempt at appeasement was a grave error in judgement.
"They are, you know, a bunch of fanatics," he said. "They are indoctrinated to hate the West, to hate India, to hate everything other than their own brand of Islam."
Hide an army
Having decided on the political front to reclaim Swat, the Pakistani army is now waging a costly battle.
Pakistani troops attempt to retake Swat one mountainous ridge at a time
As American and British forces attempt to push the Taliban to the south of Afghanistan, the Pakistanis are trying to push them on their own side of the border further north-west in a bid to squeeze the extremists as tightly as possible.
But the terrain itself has a role to play in this war, the programme finds, as you can hide an army in the rugged hills in this mountainous and cavernous part of the world.
Sweeney visits the recently abandoned bomb laboratories used by the Taliban in Swat before they were forced back into the mountains.
It is here that Sweeney is told the Taliban planned to build the explosives that continue to take their toll on Pakistani, American, British and other coalition troops in Afghanistan.
The explosive packs strapped to suicide bombers who are striking with alarming frequency in Pakistan's villages, towns and cities were also to be built here, Pakistani commanders told Panorama.
While flying in by helicopter presents a target for Taliban bullets and rocket-launchers on the ground, venturing by road risks ambush, as the programme team discovers when they come across burnt-out army vehicles from an earlier aid convoy.
"The idea that defeating the Taliban is going to be a walk-over doesn't sit well," Sweeney says of what the Panorama team witnessed.
Panorama also obtained footage from the Taliban-controlled town of Matta, showing the Talib calling for martyrs in the streets - streets devoid of women, where the local police fled so quickly as the Taliban advanced that they left their uniforms behind.
Life under the Taliban has included the public flogging of a young woman, a series of beheadings of army prisoners and a massacre in a mosque - all caught on video and shown on wider Pakistani television.
The refugees of Swat Valley will endure a scorching summer in tents
Mainstream mullahs and imans have rallied in protest of what the Taliban has been doing in the name of Islam.
Mullah Fazal Karim told Sweeney: "The Taliban are against the principles of Islam."
Beyond the war, the Panorama team looks at the human price being paid by the people of Swat for their brush with Taliban control.
Girls' schools have been burnt down, young men say they have been snatched off the streets and told that they were to train as militant fighters and some say they were told they would be forced to make the ultimate sacrifice as suicide bombers.
The resulting refugee numbers have passed two million in less than a month as the heat of summer moves in to the region, creating a human tide of need and misery.
Despite the hardships, Sweeney meets young girls defying the Taliban to learn how to read, to express their desire to grow up to be teachers, doctors and pilots.
The civilian toll is high is Swat, where families have come under fire from both sides and the combatants appear at times oblivious to so-called 'collateral damage'.
Major General Sejjad Ghani, a commander in Swat, said every effort is made to keep the fighting out of the homes of innocent residents of Swat.
"All necessary precaution has been taken," he said. "They will not get killed as long as they do not harbour militants."
That said, civilians were warned to get out of the town of Matta as the offensive began.
Major General Ghani admits that the task of clearing Swat of Taliban militants - or miscreants as the Pakistanis refer to them - will not get any easier.
"A perfect place to hide and ideal to wage an insurgency operation and a most difficult place to mount counter-insurgency operation because miscreants can hide and melt away."
As Panorama discovers, at every turn in the Swat Valley, Pakistan is paying dearly for its hasty deal with the Taliban.
Panorama: Battle of Swat Valley, BBC One, Monday, 22 June at 8.30pm.