Image copyright NDS Afghanistan Image caption Afghanistan's National Directorate of Security shared pictures of a man they claimed was Asim Umar

A top al-Qaeda leader was killed in a joint US-Afghan military operation last month, says Afghanistan's intelligence agency.

Asim Umar, the head of al-Qaeda in the Indian Subcontinent (AQIS), died in a raid on a Taliban compound in Helmand province on 23 September, the National Directorate of Security (NDS) said.

At least 40 civilians were reported to have been killed in the same operation.

The US and al-Qaeda have not confirmed Umar's death.

But the Taliban denied the news. A spokesman dismissed it as "enemy-fabricated propaganda", instead alleging that the raid "only caused heavy civilian losses".

In a statement shared on Twitter on Tuesday, the NDS said the joint US-Afghan raid took place at a compound in the "Taliban stronghold of Musa Qala" district, where Umar and other AQIS members "had been embedded".

It said six other AQIS members were also killed, "most" of whom were Pakistani. Abu Raihan, said to be Umar's "courier" to al-Qaeda leader Ayman al-Zawahiri, was named as one of those killed.

The NDS shared pictures purportedly showing Umar both alive and dead alongside the statement.

Further details of the operation and what happened to the bodies were not immediately clear.

The presence of a senior al-Qaeda leader in a Taliban compound raises questions about the militant group's willingness to cut ties with jihadists as part of peace talks with the United States.

The US launched its war in Afghanistan after the 9/11 attacks in 2001 because the Taliban, which then ruled the country, refused to hand over then-al-Qaeda leader Osama Bin Laden.

Until US President Donald Trump broke off peace negotiations last month, Washington and the Taliban appeared close to an agreement that would see US troops begin to withdraw in exchange for the Taliban renouncing and severing ties with groups like al-Qaeda.

The Taliban have been fighting a bloody insurgency against the Afghan government and foreign troops since it was toppled in 2001 and now controls large areas of the country.

Image copyright EPA Image caption At least 40 civilians were killed in the operation

Officials in Helmand have confirmed that the operation killed many civilians attending a wedding party in the vicinity.

American officials have said they were investigating reports of dozens civilian casualties.

But they suggested that most of the dead may have been killed in secondary explosions or by suicide vests worn by militants. Both US and Afghan forces often accuse the Taliban of using civilians as shields.

CBS News has reported that US special forces were also involved in the operation.

Umar has headed AQIS since its formation in September 2014.

Little is known about him but he is said to be originally from India, and spent years in the town of Miranshah, a former militant stronghold in Pakistani tribal areas near the Afghan border.

He is also reported to have worked with Kashmir-focused groups such as Harkatul Mujahedeen and Jaish-e-Mohammad prior to joining al-Qaeda.