The deadly blasts at Kabul airport caused "total panic" among Afghans who had thronged outside in the hope of fleeing to safety, away from the country's new Taliban rulers.

Wounded men in blood-soaked clothes were ferried away from the scene in wheelbarrows, while a boy clutched the arm of a man with a head injury, in images posted on social media.

"People were thrown into a canal nearby," Milad, who was at the scene of the first blast, said.

"When people heard the explosion there was total panic. The Taliban then started firing in the air to disperse the crowd at the gate," a second witness said.

"I saw a man rushing with an injured baby in his hands."

In the confusion, he said he dropped the documents he hoped would help him board a flight with his wife and three children.

"I will never ever want to go (to the airport) again. Death to America, its evacuation and visas."

Western intelligence agencies had warned of an imminent attack, with US President Joe Biden citing a terrorist threat from ISIS-K, the regional chapter of the Islamic State jihadist group.

There are just five days until the deadline set by the United States to end the airlifts.

The two devices were detonated as the sun started to set.

Thick smoke billowed into the sky as men, women and children rushed from the scene.

Shortly after the blasts, an AFP photographer saw several bodies arriving at a Kabul hospital.

Women with blood-stained faces and clothes wept as the wounded were taken inside on stretchers.

Another witness, 26-year-old Akram Lubega, who works for a catering firm, said he heard the explosion and did not know what was happening.

"Of course we are all scared," the Ugandan national said.

"Everyone is tense and the army is taking positions around the airport."

Read more:
Ten US soldiers among 20 feared dead in Kabul - report
Who are ISIS-K and what threat do they pose?