Seven Taliban insurgents, including suicide bombers, have attacked the main airport in the Afghan capital, Kabul.

The incident happened when explosions and gunfire were heard near an area that also houses major foreign military bases.

The attackers took up positions inside a partially constructed building next to the international airport.

They fought Afghan security forces for about four hours before the raid ended.

The Taliban claimed responsibility for the attack.

Roads were sealed off and flights out of the airport were quickly cancelled, while incoming flights were diverted to the northern city of Mazar-e-Sharif.

Attacks on the heavily-guarded airport used by civilians and the military are relatively rare.

It represents an ambitious target for insurgents, with recent assaults staged against less well-protected targets.

The attack will add to mounting concerns over how the 352,000-strong Afghan security forces will cope with an intensifying insurgency once most foreign combat troops leave Afghanistan by the end of 2014.

The airport is home to a major operational base for NATO-led forces that have been fighting Taliban and other insurgents for 12 years.

The attack began at about 4.30am (1am Irish time), soon after morning prayers, and plumes of smoke were seen rising from behind razor-wire fences at the airport.

Police said the attack appeared to be centred on the military side of the airport, to the west of the civilian terminal, and that the attackers were dressed as police.

Kabul Police Chief General Mohammad Ayub Salangi said two suicide bombers blew themselves up and another five were killed in the fighting.

There appeared to be no casualties among Afghan security forces or civilians.

Another police source said the attackers were wearing Afghan Border Police uniforms in order to avoid detection before they launched the assault.

Police General Salangi also said a van packed with explosives hidden under vegetables was destroyed when security forces fired a rocket-propelled grenade at it.

The Taliban said the attack was part of its 2013 "spring offensive".

Embassies in the diplomatic zone in the centre of Kabul were locked down.

Emergency alerts were heard ringing from several Western missions and military bases soon after the attack began.