Wednesday's attack in eastern Kabul took place when a suicide bomber detonated his explosives and other insurgents started a gun battle with security forces in the area, Interior Ministry spokesman Najib Danish said.
The assault came hours after provincial officials said at least 30 civilians were killed along with 16 Taliban fighters during the overnight battle between Afghan government forces and insurgents in southern Helmand province.
A local official, Attahullah Afghan, said most of the civilian casualties — which included men, women and children — came when an airstrike struck a house in the central Helmand River valley, a Taliban heartland. U.S. officials said it happened in Helmand's Garmsir district.
A U.S. military spokesman in Kabul said the airstrike was carried out by American aircraft called in to back Afghan "special security forces" after they came under heavy Taliban fire. Maj. Bariki Mallya, the spokesman, said in an email exchange that the airstrike was conducted in self-defense after Taliban fighters armed with rocket-propelled grenades and heavy machine guns retreated into a compound and continued firing on Afghan government forces and their American advisers.
"In self-defense, the ground force called an airstrike," Mallya said. "After the strike, there were secondary explosions, we assess from explosives inside the compound. At the time of the strike, the ground force was unaware of any civilians in or around the compound; they only knew that the Taliban were using the building as a fighting position."
Mallya declined to say what the U.S. knew about civilian casualties or whether the incident was under U.S. investigation. In a prepared statement, he said the U.S. investigates every "credible allegation of error and reviews every mission to learn, adapt and improve."
A statement from the governor's office in Helmand confirmed that 16 Taliban insurgents were killed and said that an investigation was underway to determine the number of civilian casualties. It said the militants had stockpiled ammunition in the area of the operation, which could have caused civilian casualties. There was also a car packed with explosives that ignited during the strike, the statement added.
Abdul Wadod Popul, a lawmaker from Helmand, also confirmed the civilian casualties. "The area is under Taliban's control and is very difficult to get a precise number of casualties," he said in Kabul.
The resurgent Taliban, who in recent years have taken over nearly half of Afghanistan, claimed the attack Wednesday in Kabul. Kabul police spokesman Basir Mujahid said the target of the attack was a security company called G4S. He had no details on the company, but the website of a multinational security company named G4S has London contact information.
The attacks were the latest in a series of brutal and near-daily Taliban assaults on military and police forces and government and other installations throughout the country. The Taliban view the U.S.-backed government in Kabul as a dysfunctional Western puppet and have refused repeated offers to negotiate with it. They carry out near-daily attacks on Afghan security forces.
U.S. and NATO troops formally concluded their combat mission in Afghanistan in 2014, but still provide close support to Afghan forces and carry out counterterrorism operations. Some 15,000 American forces are currently serving in Afghanistan.
The fighting came as Afghan President Ashraf Ghani was in Geneva, attending a two-day U.N.-backed conference that ends Wednesday and that is focused on development, security and peace efforts in the war-battered country.
Burns reported from Washington. Associated Press writer Amir Shah in Kabul contributed to this report.