Fraidoon Obaidi, the chief of the Kabul police Criminal Investigation Department, told Reuters news agency that security forces shot dead two men suspected of carrying out the attack, which began late on Wednesday with a large explosion followed by gunfire.

Obaidi said that another 44 people, including 35 students, were wounded, while about 700 to 750 students were evacuated from the university.

Sporadic gunfire could be heard through the night and, before dawn, police said the operation had concluded.

"The fight is over and at least two attackers have been killed," a police official at the scene told Reuters. "Right now a clearance operation is ongoing by a criminal technique team."

No group has so far claimed responsibility for the attack, which comes as the Taliban step up their summer fighting season against the Western-backed Kabul government.

The attack came after two professors at the university - an American and Australian - were kidnapped in the heart of the capital earlier this month, the latest in a series of abductions of foreigners in the conflict-torn country.

The management of the elite American University of Afghanistan, which opened in 2006 and caters to more than 1,700 students, was not immediately reachable for comment.

NATO ended its combat mission in Afghanistan in December 2014 but thousands of troops remain to train and assist Afghan forces, while several thousand more US soldiers are engaged in a separate mission focusing on al-Qaeda and the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) group.

The US said it was closely monitoring the situation in Kabul after the university attack and that forces from the US-led coalition were involved in the response in an advise-and-assist role.

No group has so far claimed responsibility for the attack [Getty Images]