KABUL, Afghanistan -- A powerful suicide bombing targeted an under-construction medical facility Wednesday near Bagram Air Base, the main American base north of Afghanistan's capital, the U.S. military and Afghan officials said. Two civilians were killed and more than 70 people wounded.

The Taliban later claimed responsibility for the attack and Afghan officials said all the insurgents were killed. The Bagram airfield was not in danger, said Col. Sonny Leggett.

The facility is being rebuilt to help the Afghan people who live in the area, the U.S. military said.

U.S. Secretary of State Mike Pompeo said in a statement that at least four dozen civilians were killed in this attack, but Afghan officials disputed that number. There was no immediate explanation for the discrepancy.

Bagram District Gov. Abdul Shokor Qodusi said the facility was attacked by six Taliban insurgents following the suicide bombing. He said the facility was not under construction as Pompeo said but had been built years ago by Koreans and has been closed since 2015.

“The attacks seriously damaged a hospital that was being rebuilt for the Afghan people," Pompeo said in his statement. “This is precisely the kind of activity that we’re working to reduce through the efforts that we’re undertaking. The people of Afghanistan deserve an end to these senseless acts of violence."

The Taliban control or hold sway over nearly half of Afghanis tan, staging regular attacks that target foreign and Afghan forces, as well as Kabul government officials, but also kill scores of civilians.

Outside the sprawling base, several homes, mostly belonging to the poor, were destroyed. A large mosque in the area was also badly damaged.

Shortly after the bombing, Afghan troops, special forces and intelligence officers cordoned off the perimeter of the base with armored personnel carriers. Heavily armed soldiers kept residents far from the base gates.

Within minutes of the suicide bombing, U.S. fighter aircraft bombed the area, according to witnesses.

Earlier reports suggested a U.S. military convoy might have been the target of Wednesday's attack.

Dr. Abdul Qasim Sangin, a physician who heads the main hospital in the province, said the hospital near the perimeter of the base was on fire. It wasn't immediately clear if any foreigners were inside the hospital.

Gen. Mahfooz Walizada, police chief of Parwan province, where the base is located, confirmed the attack but offered no details on casualties.

Sangin said his hospital received six wounded, all Afghans. Five were in stable condition and one was critical, he said. Scores more were treated and released by medics at the scene. Most were suffering cuts and bruises from flying glass and debris.