Afghan security forces have tackled heavily-armed militants who seized a building near the main airport in the capital Kabul on Monday morning.
Officials said seven gunmen had been killed in the five-storey building under construction near the airport and the attack was now over.
The Taliban earlier said that they carried out the assault.
The incident began shortly after dawn on Monday with witnesses reporting the sound of explosions and gunfire coming from the airport.
Exchanges of fire went on for some hours with the Taliban firing rocket-propelled grenades into the surrounding streets.
All flights were cancelled in and out of Kabul international airport, which is home to a large Nato-led military base. Nearby roads were closed.
US Blackhawk helicopters circled above but on the ground the fighting was all carried out by Afghan police and army units, who have become far better at combating the insurgency.
Embassies on alert
Afghan police rapid reaction force sealed off the area and began clearing the building floor by floor.
Kabul police chief General Ayoub Salangi later said that seven attackers had been killed – two when they detonated their explosives and five who were killed by security forces.
He said there were no civilian or military casualties.
As the drama unfolded, embassies in the diplomatic area of Kabul were quickly locked down.
Reports said the US embassy had sounded its “duck and cover” alarm and announced on loudspeakers that the alarm was not a drill.
Alarms were also heard ringing loudly from the British embassy.
The Taliban announced a “spring offensive” in April, saying it would target foreign military bases and diplomatic areas.
Last month, Afghan security forces fought Taliban insurgents for hours in the centre of Kabul after a major explosion shook the city.
Most international troops are scheduled to leave Afghanistan by the end of 2014. Afghan forces are due to take responsibility for the security of the whole country in the next few months, for the first time since 1992.