Al-Qaida's leadership is a shattered remnant, reduced to begging funds and munitions from local allies and with its most capable members heading to Syria, according to recent briefings from Pakistan's intelligence services.

But western analysts say the group retains the ability to regenerate quickly and dangerously and its ideology remains a potent threat around the world, as the closure of US embassies across the Middle East this week shows.

With fewer than 100 leaders, fighters and trainers and few experienced operators, the ability of the group's Pakistan-based "general command" under Ayman al-Zawahiri, the Egyptian-born militant who replaced Osama bin Laden after he was killed by US special forces in 2011, to launch overseas attacks is limited, Pakistani officials have said.

As demands mount elsewhere in the Islamic world, policymakers and specialists have to decide the focus of counter-terrorist efforts. But there is still little consensus on which elements of the al-Qaida phenomenon pose the greatest threat. In July, it was reported that the CIA would be shifting resources from Afghanistan and Pakistan to the Middle East and Africa.

The current capabilities of the core leadership element of al-Qaida, founded in the Pakistani frontier city of Peshawar 25 years ago on 11 August and still based in the country, is a particularly controversial topic.

US intelligence services and many of their counterparts overseas, including British agencies, broadly concur with the Pakistani view that the al-Qaida "senior leadership" or "general command" in the troubled south Asian state has been significantly damaged by the elimination of the majority of its senior operatives and by lower levels of support in the Muslim world. However, some argue that it remains a significant threat, particularly with most US and international forces due to leave Afghanistan within 18 months.

Daveed Gartenstein-Ross of the Foundation for Defence of Democracies, a Washington thinktank, said: "Al-Qaida central has been degraded, but what does that mean? Their ability to regenerate is probably greater than most analysts believe."

A recent report published by Canadian intelligence services referred to al-Qaida's "hardcore" having "a deeper bench" of leaders and operatives. This, among other factors, suggested that "Al-Qaida Core is extremely likely to exist in 2017 much as it existed – despite predictions and assessments to the contrary – in 2007," the report said.

The approaching withdrawal from Afghanistan has intensified the debate. The departure of most international troops could, some fear, provide a propaganda victory which would reinvigorate extremists both internationally and locally. Another concern is heightened lawlessness in Afghanistan which would help militant groups there and in Pakistan.

"The … withdrawal of US forces and Isaf [International Security Assistance Force] troops from Afghanistan by 2014 further suggests that core al-Qaida may well regain the breathing space and cross-border physical sanctuary needed to ensure its continued existence," the Canadian report says.

Some analysts point out that together these factors partially replicate the circumstances in which al-Qaida emerged.

"It is back to the future – you can't help but see parallels," said one Middle Eastern diplomat who was stationed in the region in the early 1990s.

'All won their battles'

Al-Qaida was founded by veterans of the war against the Soviets in Afghanistan. The victory over the massive conventional forces of the USSR was a key factor in the formulation of the group's radical new global approach, which sought to target the US – the so-called "far enemy" – to weaken regimes in the Middle East – the "near enemy" – and overcome the parochialism and infighting that plagued Islamist extremists at the time. The chaos in Afghanistan that followed the Soviet withdrawal and its destabilising effect on Pakistan helped al-Qaida to thrive through the following decade.

Bin Laden (pictured right) left Pakistan for Saudi Arabia in 1991, though many militants remained, and then went to Sudan. He arrived in Afghanistan in 1996 at the invitation of local warlords. He then became close to Mullah Mohammed Omar, the leader of the Taliban, and was sheltered by the hardline movement until the war after the 9/11 attacks in 2001 that led to the end of its rule.

Maleeha Lodhi, a former Pakistani ambassador in Washington and analyst, said: "The effect on militants [of the US withdrawal] depends on how the war [in Afghanistan] ends. There is a danger that the extremists see this as yet another defeat for another superpower and that would embolden them." Lodhi said a political settlement in Afghanistan would make such a narrative difficult to sustain. However, progress in negotiations between the Taliban, the US and the Afghan government has been slow. Afghanistan also faces new presidential elections late next spring and violence is rising.

The coming international withdrawal is already having an impact even on long-running conflicts where there has never been any al-Qaida involvement.

In the parts of the disputed Himalayan former princedom of Kashmir, where insurgency has pitted local and Pakistani-based militant groups against security forces for more than two decades, the "success" of the Taliban is seen by some as an argument for resuming a strategy of violent resistance that has largely been abandoned in recent years.

In the town of Sopore, a hotbed of insurgent violence in northern Indian-administered Kashmir, young men spoke to the Guardian in between bouts of throwing rocks at local police during a morning's rioting last month. Events in Afghanistan, they said, had inspired them.

"The US forces have pulled out because they could not beat the Taliban. This is an example for us. If we fight back we too can achieve something," said Shakeel Ahmed, a 24-year-old pharmaceutical representative. Muzaffar Ahmed Wani, a 50-year-old schoolmaster in the southern village of Tral whose teenage son is fighting with the Hizb-ul-Mujahideen group, said events in Afghanistan would "definitely have an impact".

In Peshawar itself, few doubt that the withdrawal will encourage local fighters.

"My father's father fought the British, my father fought the Soviets, my brother fought the Americans. All have won their battles even with small guns and stones against tanks and helicopters. This shows that when you fight in the way of God you will always win, whatever is against you," said Mohammed Rasheed, who works in a restaurant near the city's main bus station.

But it is less clear that events in Afghanistan will have the same effect further afield. Internet forums and propaganda websites are dominated by news from Syria or other Middle Eastern countries. Al-Qaida "general command" has also lost its most effective propagandists: Bin Laden himself and Abu Yahya al-Libi, a younger militant who was killed last year. Al-Zawahiri, the current leader, lacks the charisma of either.

A key factor determining the evolution of the remnant of al-Qaida's core in Pakistan in coming years will be its local allies, analysts agree. If either the Afghan Taliban or the rough coalition of groups known as the Pakistani Taliban (TTP) are definitively defeated, significantly degraded or conclude an agreement to lay down their weapons, al-Qaida could find itself without the haven that has given a modicum of precarious security over the last decade. Allies such as the Haqqani network, another organisation based on the Afghan-Pakistani frontier, could also withdraw support, though this is considered unlikely in the short term.

"In some scenarios al-Qaida could be badly squeezed," said Ejaz Haider, a security analyst in Islamabad.

Tenacious ideology

For many years, the local outfits were junior partners to the prestigious international group. This is no longer the case, according to Pakistani officials.

"We see [al-Qaida] more and more dependent on local networks who have funds and weapons and recruits, but with less and less to offer them. The overall picture is very fragmented," said one senior officer based in the western Punjab province.

One indication is the flow of recruits. Intelligence services are picking up signs that the TTP or even other "international" groups with a presence on the frontier are being preferred by volunteers. In one recent case, a young Pakistani who was studying in the UK returned to his homeland and sought out the TTP despite attempts by al-Qaida to recruit him. In another case volunteers chose the Islamic Movement of Uzbekistan, which has long been based in the tribal areas.

One key development is what analysts call the "Pakistanisation" of al-Qaida in the country. Senior al-Qaida leaders established a local branch to develop operations and links in Pakistan several years ago and have recently ramped up propaganda directed at south Asian Muslims.

"You are seeing a lot of material related not just to fighting in Afghanistan but focusing on Bangladesh, India and Burma that we have not really seen previously," said Aaron Zelin, a researcher at the Washington Institute for Near East Policy.

But now analysts see a growing influence of locals inside the formerly almost exclusively international "al-Qaida hardcore". Recently, a Pakistani cleric has taken on the role of ideologue and spokesman for al-Qaida. The reported movement of al-Qaida operatives to Syria, if confirmed, could be evidence of a possible split, as those unhappy with the increasingly local character and focus of what was once the centre of an international network focus on waging "global jihad" elsewhere.

Much of the expert testimony heard by a US House of Representatives foreign affairs sub-committee in August examined the future threat posed by the broader al-Qaida movement to the west. This threat was largely seen as coming from a tenacious ideology, affiliated groups, so-called "lone wolves" and veterans of conflict in Syria.

"The overall situation today is reminiscent of – though not identical to – that of the 1990s, when, like now, several jihadi groups with local and regional agendas were operating across the Muslim world," Thomas Hegghammer, an expert at Stanford University, told the subcommittee. "Then as now, western governments were unable or unwilling to pursue them militarily, and the [local] groups themselves were unable or unwilling to attack in the west. Then as now, Europe had semi-radical communities operating just within the confines of the law and regularly sending foreign fighters to conflicts in the Muslim world."

In the 1990s al-Qaida was barely known, and its strategy of targeting the west was largely untested. Today, going global represents a shorter ideological leap for extremists than for their predecessors. One possibility is an entirely new group forming. "Such an initiative could emerge within a faction of an existing organisation or it could occur as a result of a dynamic of competition [for outside funds and recruits] between grouplets in an area with many actors. That could certainly happen in the Afghanistan-Pakistan area," Hegghammer said.

The men who founded the international terrorism group

On 11 August 1988, a small group of men met in Peshawar to discuss the formation of an international group of committed Islamic extremists that would continue to fight beyond Afghanistan now that Soviet forces were pulling out of the country. On 20 August they met again and formally established "al-Qaida" as an "armed Islamic faction".

Among them were:

Osama bin Laden, the former leader of al-Qaida. He was killed by US special forces in May 2011, aged 54.

Ayman Al-Zawahiri, former head of the Egyptian militant group Islamic Jihad, now leader of al-Qaida. Aged 62.

Mohammed Atef, aka Abu Hafs. Al-Qaida's military commander, killed in Afghanistan in 2001 by one of the first missile strikes from an unmanned US drone. Died aged 57.

Jamal al-Fadl. Of Sudanese origin, he fell out with bin Laden in the mid-90s and volunteered for the US witness protection scheme. He provided key testimony in the US v bin Laden trial in the spring and summer of 2001. Aged 51.

Wael Hamza Julaidan. A veteran organiser of international Arab volunteers in the 1980s. He was still in touch with bin Laden in 2000. Current whereabouts unknown. Aged 55.

Abu Ubaidah al-Panjshiri, Egyptian veteran fighter in Afghanistan. Died in boat accident in Africa in 1996, aged 46.