Former president Hamid Karzai has said the US is using Afghanistan as a weapons testing ground as he called the recent use of the largest-ever non-nuclear bomb "an immense atrocity against the Afghan people".

Last week, US forces dropped the GBU-43 Massive Ordnance Air Blast (MOAB) bomb in eastern Nangarhar province, reportedly killing 95 militants.

Mr Karzai, in an interview with the Associated Press, objected to the decision, saying that his country "was used very disrespectfully by the US to test its weapons of mass destruction".

The office of President Ashraf Ghani said following the bomb's usage that there was "close coordination" between the US military and the Afghan government over the operation, and they were careful to prevent any civilian casualties.

But Mr Karzai harshly criticised the Afghan government for allowing the use of the bomb.

"How could a government of a country allow the use of a weapon of mass destruction on its own territory? Whatever the reason, whatever the cause, how could they allow that? It's just unimaginable," he said.

The strike was carried out on Thursday morning against an Islamic State tunnel complex, carved into a mountain in Nangarhar province, that Afghan forces had tried to assault repeatedly in recent weeks, according to Afghan officials.

US and Afghan forces have been battling the Taliban for more than 15 years, but the US military unveiled the largest conventional bomb in its arsenal against the Islamic State group, which has a far smaller but growing presence in Afghanistan.

US President Donald Trump has publicly vowed to aggressively confront IS.

Mr Trump called the operation a "very, very successful mission" but Mr Karzai had harsh words for the new US leader.

"My message to President Trump today is that he has committed an immense atrocity against the Afghan people, against fellow human beings," he said.

"If the American government sees us as human beings, then they have committed a crime against fellow human beings, but if they treat us as less than human beings, well, of course they can do whatever they want."

The US estimates 600-800 IS fighters are in Afghanistan, mostly in Nangarhar.

American forces have concentrated on fighting them while also supporting local Afghan forces against the Taliban.