Taliban insurgents on Monday launched a grenade and gun attack on Kabul airport, firing on military buildings before being overwhelmed in an operation hailed as a victory for Afghan security forces.
Two suicide bombers blew themselves up and all five other attackers were killed when elite Afghan troops stormed two half-built mansions where the militants were holed up near the airport's perimeter fence.
The security forces' response was widely praised as a sign of their growing professionalism as they take over responsibility from 100,000 US-led foreign combat troops who will pull out by the end of next year.
President Hamid Karzai, who is currently visiting Qatar, highlighted the effectiveness of the foreign-trained units after only two civilians suffered minor injuries in the attack.
"Brave Afghan security forces have the ability to repel any enemy attack and can protect people and their country," Karzai said in a statement.
Loud explosions from rocket-propelled grenades (RPGs) and sporadic bursts of small-arms fire continued for about four hours after the fighting awoke residents of the Afghan capital at 4:30 am (midnight GMT).
"There were seven assailants -- two (suicide bombers) died detonating themselves and five others were killed," Kabul police chief Mohammad Ayoub Salangi told reporters.
The heavily-guarded airport, which has both civilian and military terminals, contains a large base for the US-led NATO coalition deployed to help Afghan forces thwart the 12-year insurgency.
"We can report that RPGs were fired in the direction of the airport but we don't have any news of damage," a NATO spokesman told AFP.
Three suicide vests were found in the multi-storey buildings where the insurgents had used RPGs and machine guns to fend off Afghan forces and to attack the airport on the northeast side of Kabul.
The militants, who wore military and police uniforms, did not manage to breach the airport's grounds, though all flights were cancelled or re-routed for several hours.
A Taliban spokesman said the group was responsible for the attack, adding that a large number of foreign and Afghan soldiers had been killed -- a claim dismissed by Afghanistan and NATO.
A car laden with explosives at the scene was detonated deliberately by police using a RPG, a senior official said.
The ability of Afghan police and soldiers to suppress the Taliban insurgency is crucial to the government's efforts to avoid spiralling instability as NATO combat troops withdraw.
The police and army are often criticised nationwide as indisciplined and poorly-equipped, but special forces units in Kabul -- mentored by Norwegian experts -- have recently scored successes in tackling attacks on the city.
Kabul last came under attack on May 24, when Taliban militants launched a coordinated suicide and gun assault on a compound of the International Organisation for Migration.
A policeman, two civilians and all four militants died in that attack, and Afghan security forces won credits for an effective response.
The Taliban, who were ousted from power in Kabul in 2001 for sheltering the Al-Qaeda militants behind the 9/11 attacks, have fought a long and bloody insurgency against Karzai's US-backed government.
Also on Monday, six militants used a truck bomb to attack a provincial council building and voter registration centre in the southern province of Zabul.
All the attackers were killed and three police and 15 civilians were wounded, officials said.
In a recent incident which shook confidence in Afghanistan's prospects after 2014, International Committee of the Red Cross offices in the eastern city of Jalalabad were hit on May 29.
The Taliban denied any involvement in the assault.