Afghan forces have killed the last of the insurgents who attacked the United States embassy, Nato headquarters and police buildings in the capital Kabul, after more than 19 hours of fighting.
The Ministry of the Interior says security forces, in which New Zealand SAS soldiers played a role, killed nine gunmen. At least seven people, including four policemen, also died.
The attack, the most complex in Kabul to date, comes as US and other foreign forces begin to withdraw their troops.
The US embassy says none of its staff members is among the casualties, but Nato has confirmed six International Security Assistance Force personnel were wounded.
Defence Minister Wayne Mapp says the SAS was involved in a "mentoring" role and once the operation was complete, SAS involvement ceased.
Dr Mapp says there were no New Zealand injuries.
A New Zealand Defence Force source said earlier police officers in the Afghan Crisis Response Unit were involved, with SAS soldiers providing support to the unit.
The attack comes three weeks after suicide attackers stormed the British Council office in Kabul, killing New Zealand SAS soldier Corporal Doug Grant and more than 10 Afghan policemen.
The Taliban says it was behind the attack, although Afghan officials have blamed the Haqqani network, an insurgent group linked to the Taliban but which operates independently.
The insurgents holed up in a 13-storey building still under construction, and launched their attack early on Tuesday afternoon local time.
Suicide bombers had earlier detonated explosives at a police building in western Kabul and a regional police centre. Police killed a third bomber and seized explosives, the Kabul police chief said in a statement.
The Taliban claimed responsibility for the attacks which NATO said were an attempt to derail plans to hand over security to Afghan forces.
On Saturday a huge truck bomb at a NATO base in central Afghanistan killed four Afghan civilians and wounded 77 US troops.