There was a loud, sharp sound followed by flames and massive blast of wind that threw the young boy twenty yards through the air. It felt as if he had fallen off the mountain.

When he pulled himself to his feet, dazed and battered, he discovered nine members of his family were dead and that his mother was badly wounded. All were victims of a deadly artillery shell fired by the Pakistani military battling with Taliban fighters in the country's mountainous border region. As soon as they were able, the boy's remaining family and the rest of his village fled.

That was two months ago. Now 12-year-old Ikram Ullah sits with thousands of others in a wretched, fly-ridden refugee camp close to the north-west city of Mardan, his face streaked with dirt and tears as he tells his story and wonders what will happen to him. The food is poor, there are few proper facilities and there is nothing to do. "Life here," he says, crouching in the dust among rows of canvas tents, "is filled with sadness and grief."

Download the new Independent Premium app Sharing the full story, not just the headlines

Ikram is not alone. Aid agencies estimate up to 200,000 desperate people have been forced to leave their villages as a result of the fighting. Scattered in camps across northern Pakistan, they offer a glimpse into a deadly conflict largely overlooked by the West but which has created chaos and misery for the region's civilian population. All the while, as the Pakistan Army bends to pressure from the US to do more to confront the Taliban militants building strongholds and extending their influence in the tribal areas, so the fall-out for the civilians gets worse. Every day their lives are threatened both by the pounding jets that sweep into the valleys on bombing runs and by the clattering helicopter gunships that the Pakistan military is using to spearhead its assaults. The people sitting in the dust are the so-called "collateral damage" of Pakistan's own war on terror.

But the danger goes far beyond that. The spread of the Taliban and the seemingly endless cycle of violence they have created threatens the very fabric of Pakistan, an unstable nuclear-armed state that at times appears on the very brink of unraveling. Were that to happen the consequences both for the country and the region would be unthinkable. The civilian administration elected earlier this year, pulled back and forth by the various pressures upon it and its stalted, stuttering approach to confronting the militants, at times looks ill-prepared to tackle this most pressing of problems.

Until now, the conflict - which can trace its roots to the 1970s and 1980s when the Pakistani military and US government funded and encouraged Islamic mujahideen fighters to wage guerilla war against Soviet forces in Afghanistan - has largely played out in remote tribal areas located along its north-western border. For those in the West it has been a conflict easy enough to ignore, should they choose. The tribal agencies have long been considered an area all but outside the control of the central government.

But that has started to change. In recent months, militants have escalated their attacks on targets linked to either the Pakistani military and police or the West in what they say is a direct response to the government's decision to bow to US pressure. The most stunning of these was the truck-bomb attack on the Marriott Hotel in Islamabad in September that more than 50 people dead, including half-a-dozen foreigners. There have also been attacks on the country's prime minister and the Anti-Terrorism Police's headquarters, while in August the Taliban claimed responsibility after two suicide bombers killed around 70 people at a munitions plant at Wah, 20 miles from the capital. A Taliban spokesman said afterwards: "Only innocent people die when the Pakistan army carries out airstrikes in Bajaur or Swat."

At the same time, areas outside of the tribal regions have seen the increasing influence of the Taliban. There was panic earlier this summer when it was claimed militants were threatening to lay siege to the strategically important city of Peshawar, capital of the North West Frontier Province. (NWFP). In the province's Swat Valley, once a leading tourist attraction and considered the "Switzerland of Pakistan", the army has also stepped operations against militants. And last week shopkeepers in Lahore, long considered a bulwark against extremism, began publicly setting fire to DVDs of pornographic movies after receiving threats from militants.

* * *

The tribal areas are a world apart. Officially known as Federally Administered Tribal Areas (FATA), they are squeezed in between Afghanistan and Pakistan's NWFP in a strip that runs north to south-west and contain some of the most mountainous and inhospitable terrain in the region. Large parts of these seven rugged agencies - North and South Waziristan, Kurram, Orakzai, Khyber, Mohmand and Bajaur - are also utterly lawless.

Peopled by Pashtun tribes famous both for their fierceness and code of traditional hospitality, the area has only ever nominally been in the control of the central government and has instead been governed by tribal leaders and their traditional jirgas, or community meetings.

Daily coronavirus briefing No hype, just the advice and analysis you need Enter your email address Continue Continue Please enter an email address Email address is invalid Fill out this field Email address is invalid Email already exists. Log in to update your newsletter preferences Register with your social account or click here to log in I would like to receive morning headlines Monday - Friday plus breaking news alerts by email Update newsletter preferences

The region's virtual autonomy dates to the creation of Pakistan. After the British left the subcontinent following Partition, the tribal areas technically became independent and it was up the tribal chiefs or maliks to agree whether or not to become part of Pakistan. As part of the deal that was agreed, the tribal chiefs managed to ensure they would retain the large degree of autonomy they had enjoyed under the British empire.

Following the Soviet invasion of Afghanistan in 1979, it was through these tribal areas that dictator Zia ul-Haq - with funding from the US and Saudi Arabia - dispatched thousands of young fighters to join Afghan militias opposing the Red Army. Training camps were set up by the ISI intelligence agency along the border to prepare these fighters for battle. Praised by Ronald Reagan as "freedom fighters", these mujahideen, or holy warriors, were a crucial factor in the Soviet's decision a decade later to withdraw.

In 1994, following years of civil war in Afghanistan, the government of Benazir Bhutto, provided financial and military backing to a group of Afghan fighters based in the city of Kandahar and calling themselves "the students" or Taliban in their efforts to take control of the country. Bhutto argued that stability in Afghanistan and a government of its own sponsorship would help Pakistan. "I don't know how much money they were ultimately given," she later recalled. "I know it was a lot. It was just carte blanche." Two years later the Taliban seized Kabul and set in place an increasingly authoritarian rule that only ended when the US invaded following the 2001 al-Qa'ida attacks on New York and Washington.

When the Taliban and al-Qai'da fighters they had given refuge to were forced from Afghanistan, it was into the tribal areas of Pakistan that many fled. Bin Laden himself managed to slip away in late 2001 through the White Mountains after apparently having been surrounded by Afghan militia at Tora Bora. Eversince, he and his deputy Ayman al-Zawahiri have been linked to both the South Waziristan and Bajaur areas.

In these tribal areas, among fellow Pashtuns, the Taliban received warm welcome. As they were able to regroup and rebuild and to again take up battle against US and Nato forces inside Afghanistan. At the same time, their influence spread and increasing number of Pakistan Taliban were recruited to an anti-American jihad. A number of Pakistan Taliban leaders are now firmly established in the tribal areas.

It is these fighters that have been the focus of on-and-off operations by the military since Pakistan signed up to George Bush's war on terror. Both Pervez Musharraf and the recently elected civilian government have backed both negotiated settlements and military force to try and deal with the militants.

But in August, after constant pressure from Washington to do more to stop the flood of militants crossing into Afghanistan and attacking US and Nato troops, the Pakistan military launched a major operation in the Bajaur agency - home of the 12-year-old Ikram and his family. The effect has been devastating.

"When the fighter jets came into our valley four people were killed," says Abdul Rauf, a creased-faced 50-year-old refugee from a Bajaur village called Tauheedabada. "All the people were crying, we were frightened. After that we started to run away."

There are thousands of people like Rauf, thousands who have suffered tragedies like endured by Ikram. Aid agencies say a little under 200,000 people have been forced from their homes, but that is partly guesswork. "Since mid-August, we've seen an exodus of about 190,000 people from areas bordering Afghanistan. This includes Bajaur and Swat," said Vivian Tan of UNHCR. "The government tells us over 168,000 people are internally displaced in NWFP, while the Afghan authorities in Kunar province have reported about 20,000 people arriving since mid-August. We have no access to most of these border areas, so we're relying completely on government figures."

* * *

Pakistan's army is headquartered in the neat and well-tended cantonment district of Rawalpindi, the garrison city located near Islamabad. It from here that the fight against the militants is overseen and officers bristle at the suggestion that the military's efforts to root out the militants is only half-hearted.

On the wall of Lt Col Haider Baseer's office, beneath of photograph of Pakistan's founder, Mohammad ali-Jinnah, is pinned a photocopied map showing the location of some of the ongoing operations. A total of 120,000 troops are currently deployed. "We are operating in Swat, in Bajaur, in

Darra Adam Khel and North and South Waziristan," says the colonel, a military spokesman, whose office is located in a quadrangle containing sweet-smelling roses.

The colonel admits the military has been surprised by the resistance offered by the Taliban. A total of 1,400 soldiers and paramilitaries (from the Frontier Corps or FC) have been lost in operations since 2001. He says the Taliban is fighting a classic guerilla war and that both the terrain and the enemy is difficult. "Everybody has a gun," he says. "It's their culture."

The situation is made more difficult by the fact that this conflict pitches Muslim against Muslim and often - in the case of the FC - Pashtun against Pashtun. There have been reports of desertion and surrender. One military officer who has been based in Swat and Warisistan admitted this was, at least initially, a problem for many troops. "At the beginning, before we were inducted into this war, it was troubling. We asked ourselves, how are we going to fight against fellow Muslims? In the Pakistan army we were motivated to fight against India and if we die, we were told we become martyrs who go to heaven," he says. "Now I am convinced that I am fighting this war for my country and my religion. When I arrived in the tribal areas, I saw how the militants, the terrorists were working against the country and the religion. Now we see all the criminal elements getting into their fold. They do not represent Islam in any way."

What has certainly complicated matters in recent months is the involvement of US forces in the battle against militants. For a long time, the US has been using unmanned drones flown out of Afghanistan to attack suspected militant hideouts. Sometimes they claim to kill al-Qa'ida members, often they kill civilians. In June, a US airstrike killed 11 members of the FC.

Such unathourised air strikes have steadily fuelled popular sentiment against the US. But the situation was brought to boiling point in early September 3 when it was revealed US special forces had entered Pakistan and attacked the village of Jalal Khel in the Angoor Adda area of South Waziristan. Up to 20 people were killed, including women and children. The incident triggered angry protests from both villagers and Pakistan's political and military leaders. There were also a series of incidents of Pakistani and US troops exchanging fire along the border. "Obviously this is difficult. No-one wants to see foreign soldiers entering the country," says Col Baseer. "We have asked the US to stop the border incursions."

Yet the most serious allegation concerning Pakistan's seemingly lacklustre effort to confront the militants is that parts of the military establishment do not wish to. In particular, the shadowy ISI intelligence agency (whose director was recently changed) has been accused of maintaining operational links with the Taliban, the organisation it helped create three decades ago. Such allegations are nothing new; in 2002, for example, critics seized on a decision by Musharraf to arrest up to 2,000 militants in a purported crackdown only to release them all a few weeks later.

But this summer the CIA's deputy director, Stephen Kappes, travelled to Islamabad and presented what is said was evidence that mid-level ISI officials were involved in a suicide bomb plot hatched by a veteran Taliban leader Jalaluddin Haqqani that targeted the Indian embassy in Kabul, killing 54 people. Haqqani had previously been described by an ISI official as an "asset".

Remarkably, members of Pakistan's government agree with the US assessment that such links remain. One recent afternoon in Islamabad, seated on the kind of overstuffed sofa so commonly found in South Asian sitting rooms, one minister said Pakistan had always considered Afghanistan its "fifth province". Such a view had created the problems the country was now facing. "The Taliban was created by the Pakistanis and the CIA. All the problems were created here. Who do you think created these people?" said the minister, who asked not to be identified. "That is why they are not prepared to take them on. They consider them their assets."

Even military officers who reject such claims admit that the US and Pakistan have different priorities when it comes to confronting the militants. This could explain why US military operations inside Pakistan using unmanned drones have largely targeted militants blamed for attacks inside Afghanistan, such as Jalaluddin Haqqani, his son, Serajuddin, and members of their network including brothers Daud Jan and Abdur Rehman. This network has been blamed by Washington being largely responsible for a 40 per cent increase in attacks in eastern Afghanistan this year.

The Pakistan military, meanwhile, has focused its efforts on militants believed responsible for attacks inside Pakistan such as Baitullah Mehsud, who operates out of South Waziristan and who was blamed for the assassination of Benazir Bhutto last December, Maulana Fazlullah, the Taliban leader in the Swat Valley and Faqir Mohammed, a Taliban leader in Bajaur.

"The priorities are mismatching," concedes the military's chief spokesman, Maj Gen Athar Abbas. "We cannot risk opening up another front while we don't have the resources." And while Maj Gen Abbas strenuously denies the charge of supporting the re-energised Taliban, he admits too, that indirect links are maintained. "Which agency in the world would break its last contact with them?"

* * *

One morning in mid-August, the day crisp and clean, up to 4,000 Pashtuns from the town of Salarzai in the Bajaur agency gathered to talk. Some had come from up to 10 miles away to attend the meeting, arriving in pick-ups and trucks. The younger men were dressed in Salwar Kameez and vests, while some of the older tribesman wore rough woollen clothes. Many were wearing traditional Chitrali turbans, worn only for special occasions. Almost everyone was armed with many carrying Kalashnikov rifles and rocket-launchers - "a gift from the Soviet jihad".

The jirga had been called by tribal elders after Taliban militants attacked and killed two chiefs, or maliks, and a Muslim priest just days before. One of the slain maliks was Shah Zarin Khan and it was his supporters who addressed the jirga first.

For centuries, the system of jirgas - which women are not permitted to attend - have been used by the Pashtun tribes to decide important issues and make rulings. On this morning, the meeting had been called to discuss setting up a defence force or lashkar, to take on the Taliban, who had increasingly been vying for power with the tribal elders.

Syed Akhunzada Chattan, the local MP, was among those subsequently called to speak. He told the people, sitting on stones that have for decades been used as seats: "The sanctuary that we gave the Taliban was because we thought they were good people, because they had established peace in Afghanistan, because they fought against a superpower in the form of America. Then the Taliban started hurting us. These people are the enemy of Pakistan, they want a weak Pakistan. We cannot surrender our area to these people. We have to throw them out."

As Chattan spoke, the villagers raised their fists in a show of solidarity. There and then it was decided to set up the defence force and to target the Taliban leaders. An announcement went out that anyone with information about a Taliban fighter would receive a reward of 10,000 rupees. On the other hand, anyone found harbouring such fighters would be fined 1m rupees and their home burned down. Within a week, claims Chattan, the Taliban had been driven from the area.

Against the backdrop of rising militant violence, the establishment of traditional lashkars has been promoted by the military and the government as a homegrown means of confronting the Taliban. While some reports suggest the tribes are acting against the Taliban's efforts to impose the strictest of moral codes, there appears to be more evidence that the tribes object mainly to the militants' efforts to seize control in the areas and to criminal elements and "miscreants" who use the cloak of the Taliban to behave like mafia.

The military insists it provides the lashkars with "moral support" and encouragement but denies reports that it has supplied them with weapons or money. But the emergence of the lashkars at a time when the military is also increasing its operations, suggests at the very least a degree of central planning.

* * *

Understandably the setting-up of the lashkars remains a perilous task. The Taliban has persistently targeted tribal elders believed to be working against them. Earlier this month in the Orakzai area, more than 30 such elders from the Alizai tribe were killed in a suicide bomb attack at a meeting in the village of Ghiljo. As in the meeting in Bajaur, hundreds of people had gathered to discuss the establishment of an anti-Taliban force.

Indeed, a second meeting called by the tribal elders in Salarzai was also targeted by a suicide bomber sent by the Taliban. "He was caught, stripped of his explosive vest and then shot dead," said Chattan, the MP.

The combination of lashkars and the increasingly heavy military operations in places such as Bajaur and Swat, appears to he having some results. Last week, Maulvi Omar, a spokesman for the coalition of around 40 Taliban groups operating in the tribal areas, announced that it was prepared for unconditional talks with the government if the military halted its current actions. It also offered to help oust "foreign fighters" from the tribal areas.

"We are willing to negotiate with the government without any conditions," he told the BBC's Urdu service. "We are also willing to lay down our arms, once the military ceases operations against us."

The Pakistani government the offer. Its decision indicated either that the army believes it has the upper hand over the militants or that there is ongoing pressure from Washington to continue its military strikes. Either way, it was the first time the authorities had turned down such an offer of talks.

* * *

Inside out the bombed-out interior there is a frenzy activity. Electricians, plasterers, metal workers and general labourers are furiously at work while all around them is the evidence of destruction. There is rubble, there is twisted metal, there are bombed out windows, but there is also a determination to have the Marriott Hotel ready for a grand reopening party on New Years Eve.

On the evening of September 20, a massive truck bomb was detonated at the gates of this Islamabad landmark, creating a huge crater and doing extensive damage to the building. At least 54 people were killed, including 17 security guards on duty at the gates and doors of the building. In the aftermath of the blast, a fire raged here for hours, sending up huge plumes of smoke and delivering the chillingly clear message that no-one was safe from militant violence.

While it is not entirely clear who was responsible for the blast - one Taliban spokesman denied responsibility and there are many in Pakistan who will gladly proffer the most Byzantine of conspiracy theories - most observers believe this was another militant strike on a highly visible target. The hotel was centre stage in the working and social lives of the city's political and diplomatic elite. And while Pakistanis made up the overwhelming majority of the blast's victims, it was also clearly interpreted as an attack on a Western target.

"There were 2,000 people inside the hotel at the time. A lot of lives were saved," says Maj Tahir Qureshi, the hotel's head of security, leading a way past the flurry of labourers and clouds of cement dust. "The only thing we could do was to stop them at the entry gates. Those security guards gave their lives to stop it."

There had been deadlier bomb attacks before the Marriott blast and there have been others subsequently, but it this attack that forced a wider audience to take notice of what was going on in Pakistan. A conflict that had largely been confined to the tribal areas or else bomb attacks on military and police targets, was now taking place against a Five Star backdrop. President Asif Ali Zardari, while in New York, described the event as Pakistan's 9/11.

In the aftermath, Zardari, whose wife, Benazir Bhutto, was assassinated last December, vowed to continue the effort against militants. "Make this pain your strength," he said. "This is a menace, a cancer in Pakistan that we will eliminate. We will not be scared of these cowards."

The attack has also forced a wider debate about how best to confront the militant threat emanating from the tribal areas. Whether militarily or else through negotiation - as the West is now attempting with the Taliban in Afghanistan - Pakistan's recently-elected civilian leaders and its military have been forced to find a solution.

With so many people killed by the violence - one recent report suggested that in the first eight months of this year suicide bombings in Pakistan had killed more people than such attacks in Iraq or Afghanistan - there has also been endless soul-searching about the nature of the enemy. Noticeably this has emerged from within Pakistani society - commentators, politicians as well as ordinary people. Religious leaders have also spoken out against what is happening. Two groups of clerics have issued fatwas or religious orders against what now totals for than 100 suicide bombings since July 2007. they have killed around 1,200 people.

Peshawar sits on the very edge of the tribal areas. In the mid-80s Osama bin Laden had moved his family here from Saudi Arabia and developed his reputation as a patron of humanitarian and Arab causes and a supporter of the jihad. Today, for all its modernity and amenities, there is still a hint of the city's position as a frontier town.

The crenellated sandstone walls of a British-built fort now serve as the headquarters of the Frontier Corps. Meanwhile it along the historic trade route leading from Peshawar through the Khyber Pass and on to Kabul, that 85 per cent of the fuel used by Western forces in Afghanistan is transported. Last month the crossing point on this road into Afghanistan was temporarily closed by the Pakistani authorities because of what they said was poor security.

On a recent evening, the soft golden light of South Asia is slipping away as the faithful arrive to pray at the city's Sunehri mosque. In a large, airy upstairs classroom, the imam, Khan Mohammed Saeed, sits overseeing a group of young boys, hard at their study. The imam is no liberal; his view that Pakistan should be run according to Islamic law would alarm many both inside the country and abroad.

But asked about the militants located just miles from where he sat, he does not hesitate. "There are people in the tribal areas and the NWFP who have come to do bomb blasts and destroy our religion," he says. "Our religion does not give us permission to do these things…In none of our teachings or texts or what our learned scholars have taught, is there any permission to do these things."

WHO'S FIGHTING WHO

Military/government

Asif Ali Zardari, the Pakistan president, widely known as "Mr 10 Per Cent" over numerous corruption cases. He became leader of the main opposition party, the People's Party of Pakistan, after his wife, Benazir Bhutto, was assassinated last year, and became president following elections. Army chief of staff General Ashfaq Kayani says the army should remain out of politics but could yet change his mind.

Pakistani Taliban

The Taliban leaders in the wild and woolly tribal areas include former gym fanatic Baitullah Mehsud, wanted for the assassination of Benazir Bhutto. Maulana Fazlullah, the leader in the picturesque Swat valley (which was formerly a tourist destination) has his own clandestine FM radio station. Faqir Mohammed, in Bajaur, leads a religious group that forcibly imposed Sharia in the tribal areas during the 1990s.

Al-Qa'ida

Al-Qa'ida's leader Osama bin Laden, and his deputy, Ayman al-Zawahiri, may be hiding in the border regions of Pakistan while senior Taliban leaders may be living in the Pakistani city of Quetta.

Tribal leader

Anwar Kamal, a former minister, was the first to rally his tribesmen and form a lashkar, or tribal militia, to beat back the Taliban more than a year ago. Mr Kamal's success in clearing the town of Lakki Marwat, adjoining the tribal areas, has recently been replicated elsewhere.

Faultlines of history

1947 Muslim Pakistan is created out of the partition of India at the end of British rule. More than half a million Muslims, Sikhs and Hindus are killed in riots and massacres following the largest mass migration in history.

1980 After Soviet forces intervene in Afghanistan, the US gives Pakistan military support as they join forces with Saudi Arabia to fund the Islamic mujahedin.

1998 The country explodes five nuclear devices.

1999 General Pervez Musharraf leads a military coup. After 9/11 Pakistan becomes a key US ally in the "war on terror". But as turmoil mounts he is forced to quit.