KABUL (Reuters) - Afghan President Hamid Karzai said on Monday that a coordinated Taliban attack showed a "failure" by Afghan intelligence and especially by NATO, as heavy street fighting between insurgents and security forces came to an end after 18 hours.
Battles that broke out at midday on Sunday gripped the city's central districts through the night, with large explosions and gunfire lighting up alleys and streets.
"The fact terrorists were able to enter Kabul and other provinces was an intelligence failure for us and especially for NATO," Karzai's office said in a statement.
Though the death toll was relatively low considering the scale of the assault, it highlighted the ability of militants to strike high-profile targets in the heart of the city even after more than 10 years of war.
Karzai echoed his Western backers by praising Afghan security forces, saying they had proven their ability to defend their country - a task that will increasingly fall to them as foreign armies reduce their troop numbers in Afghanistan.
Yet the Afghan leader's comments underscored abiding divisions between the Afghan government and the United States.
Defense Department spokesman George Little said the Pentagon did not believe there had been an intelligence failure.
"If we're held to the standard to have to know precisely when and where each insurgent attack is going to occur, I think that's an unfair standard," he said. "This is a war zone."
The attacks mark another election-year setback in Afghanistan for U.S. President Barack Obama, who wants to present the campaign against the Taliban as a success before the departure of most foreign combat troops by the end of 2014.
Karzai's office said 36 insurgents were killed in the attacks, which paralyzed Kabul's government district and also targeted three other provinces in what the Taliban called the start of a spring offensive. One fighter was captured.
Eleven members of Afghan security forces and four civilians were killed in the well-planned attacks in Kabul and the eastern Nangarhar, Logar and Paktia provinces, the government said.
"In only a short time we managed to cut short their devilish plans," said Defense Ministry Chief of Operations Afzal Aman. "They carried suicide vests, but managed to do nothing except be killed."
Insurgents were killed attacking the Afghan parliament, and in a multi-story building under construction that they had occupied to fire rocket-propelled grenades and rifles down on the heavily fortified diplomatic enclave.
More were killed in Kabul's east, and while attacking a NATO base in the eastern city of Jalalabad.
Fighting in the capital only ended with special forces assaults that were mounted as dawn broke.
Assisting physically for the first time in the attack, NATO helicopters launched strafing attacks on gunmen in the building site, which overlooked the NATO headquarters and several embassies, including the British and German missions.
Elite Afghan soldiers scaled scaffolding to outflank the insurgents, who took up defensive positions on the upper floor of the half-built structure. Bullets ricocheted off walls, sending up puffs of brick dust.
"I could not sleep because of all this gunfire. It's been the whole night," said resident Hamdullah.
The assault, which began with attacks on embassies, a supermarket, a hotel and the parliament, was one of the most serious on the capital since U.S.-backed Afghan forces removed the Taliban from power in 2001.
"You asked what does it mean. It means we're still in a fight," General Martin Dempsey, chairman of the U.S. Joint Chiefs of Staff, said at a news briefing.
"We've got three more fighting seasons with which to both build the ANSF (Afghan National Security Forces) and diminish the capability of the Taliban," he said, before most foreign troops leave by the end of 2014.
The Taliban claimed responsibility, but U.S. officials said initial indications pointed to the Haqqani network, a group of ethnic Pashtun tribal militants allied with the Taliban who live along the Pakistan-Afghanistan border.
"We had received a great deal of intelligence that the Haqqanis were planning these kinds of attacks," Defense Secretary Leon Panetta said at the same briefing.
But both Panetta and Dempsey shied away from linking the attack to Pakistan, or the Pakistani government, as Dempsey's predecessor, Mike Mullen, did after a similar attack last fall.
"We're not prepared to suggest that this emanated out of Pakistan," Dempsey said.
Taliban spokesman Zabihullah Mujahid said the assaults in Kabul and three eastern provinces marked the beginning of a new warm-weather fighting season.
"These attacks are the beginning of the spring offensive and we had planned them for months," Mujahid told Reuters.
He said the onslaught was revenge for a series of incidents involving U.S. troops in Afghanistan - including the burning of copies of the Koran at a NATO base, and the massacre of 17 civilians by a U.S. soldier - and vowed there would be more.
The Taliban said on Sunday the main targets were the German and British embassies and the headquarters of the NATO-led force. Several Afghan members of parliament joined security forces in repelling attackers from a roof near parliament.
The attacks came a month before a NATO summit at which the United States and its allies want to put the finishing touches to plans for the transition to Afghan security control, and days before a meeting of defense and foreign ministers in Brussels to prepare for the alliance summit in Chicago.
While Western forces are already handing off to the Afghan army, local forces have apparently failed to learn lessons from the similar assault in Kabul in September, when insurgents took up a position in a tall building under construction to attack embassies and NATO offices below.
Hours before the Kabul attack, in neighboring Pakistan dozens of Islamist militants stormed a prison in the dead of night and freed nearly 400 inmates, including one on death row for trying to assassinate former President Pervez Musharraf.
Writing by Rob Taylor and Amie Ferris-Rotman; additional reporting by Missy Ryan, David Alexander and Mark Hosenball in WASHINGTON; Editing by Robert Birsel and Daniel Magnowski; Desking by Cynthia Osterman