An attack at Kabul's international airport is over after members of an elite police unit killed all four militants involved in the assault.

Four members of the Taliban attacked an outer building under construction at the airport on the morning of July 17, firing rocket-propelled grenades and automatic weapons.

Interior Ministry spokesman Sediq Sediqqi confirmed the four militants involved in the attack had been killed and said Afghan security forces had suffered no casualties.

The Taliban has claimed responsibility for the attack.

The airport lies next to a sprawling military base run by the NATO-led International Security Assistance Force.

The attack came as votes from the disputed second round of Afghanistan's presidential election are being recounted and less than six months before the bulk of foreign forces in Afghanistan depart the country.