— Shortly after security forces gunned down the last assailant involved in a brazen attack in Kabul Wednesday morning, officials said they believe the attackers were dressed as women to smuggle a huge stockpile of weapons into a building overlooking the U.S. Embassy and the NATO headquarters.

The last of six assailants who launched rockets and sprayed the heavily secured compound with rifles for hours was gunned down at 8:30 a.m., police spokesman Sediq Sediqqi said. The attack, which exposed the vulnerability of the Afghan capital as U.S. forces begin to withdraw, began at 1:30 p.m. Tuesday and involved at least three suicide bombers who detonated explosives elsewhere in the city.

Sediqqi said authorities found burqas — the blue garments worn by many Afghan woman that drapes them from head to toe — inside the van the assailants used to transport weapons into the building.

“We strongly believe they used burqas to reach this place,” Sediqqi said, speaking outside the building as reporters took photos of the six bodies of the assailants. “The police respect the women too much.”

Sediqqi said the siege ended only after Afghan and NATO special forces stormed the building Wednesday morning as NATO attack helicopters provided backup.

NATO said six coalition “personnel” were wounded in the attack. A NATO spokesman, Lt. Col. Jimmie Cummings, said three of the troops were wounded Tuesday in a rocket-propelled grenade (RPG) attack on the base. The other three were wounded while clearing the building overnight, he added.

U.S. Ambassador to Afghanistan Ryan Crocker said Wednesday that the attack was likely carried out by the Haqanni network, a Taliban offshoot group that has been linked to some of the boldest attacks in the capital.The Taliban had claimed responsibility for the attack Tuesday.

Crocker downplayed the significance of Tuesday’s attack, which kept the capital under seige for nearly 20 hours.

“These were five guys that rumbled into town with RPGs under their car seats,” Crocker said. “This is not a very big deal, a hard day for the embassy and my staff, who behaved with enormous courage and dedication. But look, you know a dozen RPG rounds from 800 meters away — that isn’t [the] Tet [offensive], that’s harassment.”

Crocker said between six and seven rounds landed inside the embassy compound. He said he was heartened by the Afghan government’s response to the attack and by what he described as a lately inconsequential attack.

“If this is the best they can do, I find their lack of ability and capacity and the ability of Afghan forces to respond to it, actually encouraging,” he said.

Transition of responsibility for security from NATO to Afghan security forces “will proceed on pace,” he added.

Crocker spoke to a Wall Street Journal reporter Tuesday morning who was asked by the embassy to share a transcript of the interview with the rest of the Kabul press corps.

Residents watched in horror as lightly armed police officers wearing no body armor fought assailants who fired rockets into diplomatic and military enclaves while holed up in an unoccupied building in what is perhaps the most secure part of the capital.

The NATO headquarters and the embassy went on high alert after the initial blasts rang out Tuesday afternoon, with diplomats barricading themselves in bunkers. American attack helicopters had joined the fight, diving down to strike at the assailants.

Kabul has seen its share of high-profile, chilling attacks this year, including recent strikes on the Intercontinental Hotel and the British Council. But the attack Tuesday was rich in symbolism in an impoverished country, scarred by years of war, where the United States has spent billions of dollars over the past decade in an elusive attempt to bring stability.

To gain access to the unoccupied 15-story building that overlooks the sprawling diplomatic and military compounds, the assailants drove into the basement, then climbed to one of the top floors and took up positions behind cement pillars, Afghan authorities said. The building is under construction.

The prolonged fighting around NATO’s nerve center in Kabul, the headquarters for top U.S. commanders, exposed serious shortcomings in security and intelligence. Early reports suggested that at least seven Afghans were killed in the attack.

A Taliban spokesman said the attack was intended to remind Afghanistan’s government and the United States about the power the insurgents still wield. “We have not run out of patience, and we want to fight to end their occupation,” said the spokesman, Zabiullah Mujahid. “We have the ability to strike when we want.”

The Afghan government took formal control of security in a number of districts around Kabul this summer as part of a plan to gradually transfer responsibility from foreign to Afghan forces over the next three years. The first phase is seen as a key test of the competence of the U.S.-funded-and-trained Afghan forces, which the Obama administration hopes will be able to secure Afghanistan with little foreign help by the end of 2014. Kabul has effectively been under Afghan security control for several years.

Afghan President Hamid Kar­zai condemned the attack and vowed that it would “embolden people’s determination in taking the responsibility for their country’s own affairs.” To many Afghans, such condemnations have begun to ring hollow as the Afghanistan war nears its 10th year, with levels of violence rising and the prospect of a negotiated settlement appearing increasingly distant.

“The government is too weak to protect us,” said Ismail Agha, 38, who lives near the tall building from which the assailants launched the attack. “They should let us go after the terrorists and fight them ourselves.”

The attack Tuesday jolted expatriates, who have grown accustomed to sporadic violence in Kabul.

Hamid M. Khan, a rule-of-law adviser in the Kabul office of the U.S. Institute of Peace, said he and his colleagues spent hours huddled in a safe room at their compound as blasts and gunshots thundered nearby at the site of the main attack.

“The entire staff is hunkered down,” he said, using BlackBerry Messenger to communicate. “We’re very tense and alarmed by how close the rocket attacks and gunshots keep coming.”

At the World Bank office, a few blocks from the U.S. Embassy, more than 35 staffers were holed up in a basement bunker that had no bathroom or provisions.

Elsewhere, as the clashes unfolded, Noorullah Mehirjoy, 60, a government worker, spent hours trying to find his young daughter, Zorah.

She had been at a graduation ceremony, where Karzai was supposed to have awarded diplomas. But a security adviser approached the president soon after the first explosions were heard and whispered in his ear, Mehirjoy said.

“Karzai left the hall without saying goodbye,” he said.

In an interview last week, the new U.S. ambassador, Ryan C. Crocker, said he was pleasantly surprised by the situation in Kabul, having last been there in 2002.

“The biggest problem in Kabul is traffic,” said Crocker, who has noted that Afghanistan’s problems are serious and will take a long time to solve.

Special correspondent Sayed Salahuddin contributed to this report.