Updated

The 20-hour insurgent attack in the heart of Kabul ended Wednesday morning after a final volley of helicopter gunfire as Afghan police ferreted out and killed the last few assailants who had taken over a half-built downtown building to fire on the nearby U.S. Embassy and NATO compounds.

"The terrorist attack in Kabul is over," the Interior Ministry said in a statement.

The U.S. ambassador to Afghanistan says the Pakistani-based Haqqani network is behind the coordinated attack against the American Embassy and NATO headquarters in the heart of Kabul.

The bold assault that started Tuesday left seven Afghans dead, including four police officers and three civilians, and raised fresh doubts about the Afghans' ability to secure their nation as U.S. and other foreign troops begin to withdraw. No NATO or U.S. Embassy employees were hurt in the attack.

Two or three of the assailants had held out overnight but were killed in the final morning assault by Afghan forces, said Hashmat Stanekzai, a spokesman for the Kabul police chief.

In all, six attackers had occupied the unfinished, 11-story high-rise at one of the main traffic circles in the Afghan capital, he said. Previously, officials had said they believed only four attackers were inside.

At least one other police officer was killed in an attack in the west of Kabul on Tuesday as suicide bombers tried to strike in a number of neighborhoods, bringing the total number of dead in the coordinated attacks across the city to at least eight people.

"Conditions in Kabul city are back to normal and all our countrymen can go about their daily lives without any worries," the Interior Ministry said.

The sophisticated attack was the first time insurgents have organized such a complex assault against multiple targets in separate parts of the Afghan capital. The militants' seeming ability to strike at will in the most heavily defended part of Kabul also suggested that they may have had help from rogue elements in the Afghan security forces.