Kabul: Heavily armed Taliban militants stormed a top Kabul hotel, sparking a ferocious battle involving Afghan commandos and a NATO helicopter gunship that left at least 21 dead including the nine attackers.

Officials said all of the gunmen were killed during the night-time raid on the hilltop Intercontinental Hotel, frequented by Westerners and Afghan officials, part of which was left in flames as tracer bullets lit up the sky.

The state-owned 1960s hotel, which is not part of the global InterContinental chain, was hosting delegates attending an Afghan security conference and a large wedding party when the insurgents struck.

The interior ministry said nine Afghan civilians --mostly hotel workers -- and two police officers were killed in the brazen assault and another 18 people were wounded. It said a ninth dead Taliban militant had been identified.

The ministry and the government in Madrid said a Spanish man -- reportedly a pilot working for a Turkish airline -- was also killed at the hotel.

Interior ministry spokesman Seddiq Seddiqi said the slain hotel workers had been on the first floor and in the lobby at the time of the attack.

Among those staying at the hotel were provincial government officials who were in Kabul for a conference on the handover of power from foreign to Afghan security forces. The process starts next month.

Two New Zealand special forces troops who had been supporting the Afghan commandos received "moderate injuries", the country's defence force said.

(Agencies)