Two bombs hit vehicles carrying cadets returning from a graduation ceremony on the city's western outskirts. Paghman district Governor Haji Mohammad Musa Khan told the reporters that many more had been injured. The bombing was claimed by the Taliban.

Three buses were attacked as they approached the capital from neighbouring Wardak province, a police official said, according to preliminary information.

"Initial information we have is that two suicide bombers were involved and there are many casualties," he said, declining to be identified by name.

An Interior Ministry official said at least 27 people were killed and 40 wounded. Taliban spokesman Zabihullah Mujahid said the first attack targeted a bus carrying police cadets and their instructors. Then, as rescuers and emergency services arrived, the second bomber rammed his car, packed with explosives, into their vehicles, killing dozens.

The attacks underline the deadly threat to security in Afghanistan just over a week before a NATO summit in Warsaw where leaders are expected to discuss whether to maintain support for the Kabul government.

Under new leader Mullah Haibatullah Akhundzada, who took over last month after his predecessor, Mullah Akhtar Mansour, was killed in a U.S. drone strike, the Taliban have made clear that they will continue attacks against the Western-backed government.

The latest suicide bombings, in the Muslim holy month of Ramadan, come 10 days after an attack on a bus carrying Nepali security guards working for the Canadian embassy in Kabul that killed 14 people.

In April, at least 64 people were killed in a Taliban attack on a security services facility in Kabul in the deadliest bombing of its kind in Afghanistan since 2011.

Last week, the top UN official in Afghanistan warned of the danger of a new spiral of violence following recent suicide attacks and a spate of highway kidnappings by the Taliban.