Suicide bombers and insurgents wielding heavy weapons and rocket-propelled grenades executed the near-simultaneous attacks in what the Taliban called an opening salvo ahead of the spring fighting season, when warmer weather typically brings increased attacks.
The attacks, the most widespread in the Afghan capital since September, came as the US-led international force is speeding up the transfer of security responsibility to the Afghans in preparation for an end to NATO's combat mission in 2014. The scale and scope of the violence underscored the challenge that Afghan security forces have in protecting even the country's centers of power.
The Taliban claimed that Afghan and foreign troops suffered heavy casualties, but reports from Afghan authorities showed the assaults were noisy, but not deadly.
The Ministry of Interior reported that 17 militants were killed in the attacks in Kabul, Paktia, Nangarhar and Logar provinces. Seventeen police - 11 in Kabul and three each in Logar and Paktia provinces - were wounded, the ministry said. Fourteen civilians also were injured in the attacks.
A Taliban spokesman, Zabiullah Mujahid, said the attacks were a kind of "message" to the Afghan and foreign forces, warning them the insurgents remain strong and resilient.
He said the assaults were the Taliban's response to recent statements by NATO Secretary-General Anders Fogh Rasmussen and NATO spokesman Carsten Jacobson, who claimed the insurgents were weak and that there was no indication they were planning a spring offensive.
"Our mujahedeen fighters are fighting with the Afghan forces in all four provinces," Mujahid told The Associated Press by phone as loud explosions rocked Kabul. "It was well-coordinated and planned for almost two months. It took two months to transfer the weapons and explosives and set up fighters in the specific areas that we planned to attack."
The attack in Kabul began Sunday afternoon with more than a dozen explosions in the central neighborhood of Wazir Akbar Khan, where a NATO base and a number of embassies, including the US Embassy, are located.
Gunfire erupted soon after the blasts, forcing people caught in the street to scramble for cover.
Militants fired in several directions from a building under construction near an intersection of roads that lead to the presidential palace, various ministry buildings and several Western embassies.
"I saw two Land Cruisers pull up and two militants jumped from the car," said Mohammad Zakar, a 27-year-old mechanic who has a shop near the building commandeered by the militants. "They opened fire on an intelligence service guard and killed him. They also fired and killed an Afghan policeman and then they jumped into the building. All the shops closed. I ran away."
Heavy gunfire crackled through the streets for hours as smoke rose over the skyline and sirens wailed. A loudspeaker at the US Embassy could be heard barking: "Duck and cover. Move away from the windows."
Residents reported a blast near parliament as militants opened fire from the building under construction.
Mohammad Nahim Lalai Hamidzai, a lawmaker from Kandahar, said he climbed the tower of the parliament building and fired on the insurgents.
"I shot up to 400 or 500 bullets from my Kalashnikov at the attackers," Hamidzai said. "They fired two rocket-propelled grenades at the parliament. The fight was around the parliament, the Russian Embassy and Vice President (Mohammed Karim) Khalili's house."
Lieutenant Colonel Jimmie Cummings, a spokesman for the US-led coalition, said insurgents took up positions mostly in unoccupied buildings outside of the heavily secured quarter that is home to military and diplomatic installations. He said the US, German and British embassies and some coalition and Afghan government buildings took direct and indirect fire.
Militants also attacked a NATO site on the outskirts of Kabul, where a joint Greek-Turkish base came under heavy fire and forces responded with heavy-caliber machine guns. A police officer said a suicide bomber was inside a building near the base and was shooting toward the Kabul Military Training Center. The officer spoke on condition of anonymity because he was not authorized to speak to the media.
At least six rocket-propelled grenades were fired at the base from an apartment building roughly 250 yards (metres) away, according to an AP reporter at the scene. Greek troops responded with small arms, heavy machine guns and grenades to suppress the fire. Two attack helicopters supported Afghan troops who tried to storm the buildings. Rocket-propelled grenades and small arms were fired toward at least five insurgents in the building.
A French convoy moving on the road initially took fire along with another NATO base near the Greek-Turkish installation. Greek troops fired hundreds of rounds to assist, as explosions rocked the area and gunfire continued into the late afternoon.
Gen. Mohammed Zahir Azimi, a spokesman for the Afghan Defense Ministry, said four militants were killed in that attack and one was arrested by Afghan National Army.
In an e-mailed statement, the Taliban spokesman said the attacks in Kabul targeted NATO headquarters, the British and German Embassies, the Afghan parliament building, two hotels and sites along Darulaman Road, where the parliament is located.
"In all these attacks, tens of mujahedeen fighters equipped with light and heavy weapons, suicide vests, RPGs, rockets, heavy machine guns and hand grenades are attacking their targets," Mujahid said.
"We are strong and we can attack anywhere we want," he said, calling the attacks an opening salvo ahead of the insurgency's spring offensive.
US Marine General John Allen, the top commander of US and NATO forces in Afghanistan, said the coalition was standing by to support the Afghan forces, if needed.
"I consider it a testament to their skill and professionalism - of how far they've come - that they haven't yet asked for that support," Allen said in a statement.
Ryan Crocker, the US ambassador to Afghanistan, praised the Afghan forces' response and said the attacks demonstrated why US troops were still needed in the country.
"It also shows there's a very dangerous enemy out there," Crocker told CNN. "To get out before the Afghans have a full grip on security - which is a couple years out - would be to invite the Taliban ... and Al Qaeda back in and set the stage for another 9/11 and that, I think, is unacceptable risk for any American."
Speaking in Berlin, German Foreign Minister Guido Westerwelle said there was some damage to the grounds of the German Embassy, but no staff were injured.
Westerwelle stressed the attacks would not prompt any change in policy.
"I have always pointed out that there may be setbacks, and I fear we will have to expect further setbacks," he told reporters in Berlin. "Nevertheless, it is right to continue the process of handing over responsibility for security to the Afghan authorities, and so to implement our withdrawal prospects."
The coordinated assaults showed a sophistication that is reminiscent of the last sustained attack in Kabul in September 2011.
In that strike, six fighters with heavy weapons took over an unfinished high-rise and fired on the US Embassy and NATO headquarters about 300 metres (yards) away. They then held out against a 20-hour barrage by hundreds of Afghan and foreign forces. By the time the fighting ended, insurgents had killed 16 Afghans - five police officers and 11 civilians.
That attack was blamed on the Haqqani network, a Pakistan-based group allied with the Taliban.
Pakistani Foreign Minister Hina Rabbani Khar expressed concern over Sunday's attacks and said Pakistan condemns terrorism in all forms and has consistently encouraged dialogue to resolve issues in Afghanistan.
At roughly the same time, Taliban fighters launched assaults on Afghan and NATO installations in the capitals of Nangarhar, Logar and Paktia provinces.
In Nangarhar, four militants - some wearing burqas to disguise themselves as women - entered a coalition base at about 2 pm. The base, near the provincial capital of Jalalabad, is home to a so-called Provincial Reconstruction Team, a joint civilian and military group that works on development and governance issues. The ministry said Afghan security forces gunned down all four of the militants.
"There were lots of blasts," said Abdul Qahar Safi, a resident of Jalalabad. "I came to take my children from the school."
At the same time, four other attackers traveling in a vehicle loaded with explosives were seen heading for an airport near Jalalabad.
"Afghan security forces were chasing a suspicious four-wheel-drive vehicle en route to the airport," said Ahmad Zia Abdulzai, a spokesman for Nangarhar province. "Before they reached the airport, the vehicle exploded."
Three were killed in the blast. Police arrested the fourth insurgent, who was injured, the ministry said. In the wreckage, police found two rocket-propelled grenades, one heavy machine gun, three AK-47s, nine hand grenades and a pistol.
In Logar province, south of Kabul, five militants occupied a building under construction and started firing in several directions, the ministry said. Three police were wounded when the insurgents, who were all shot and killed, threw hand grenades on policemen responding to the scene. Four civilians also were wounded in the attack.
Farther south in Paktia province, a group of armed insurgents - some wearing women's clothes - entered a building near a police training center in Gardez. The ministry said the militants started firing in different directions. Five civilians and three policemen were wounded. Three attackers were killed.
Also on Sunday, NATO said an international service member was killed by a roadside a bomb in the east. NATO said the death was not related to the coordinated attacks, but declined to give further details.
So far this year, 105 NATO service members have been killed in Afghanistan.