KABUL -- A powerful suicide bombing targeted an under-construction medical facility on Wednesday near Bagram Air Base, the main American base north of the Afghan capital, the U.S. military said, and six Afghans were reported wounded.

The Taliban later claimed responsibility for the attack.

The attacker struck the facility that is being built to help the Afghan people who live in the area, the U.S. military said. A U.S. spokesman said in a subsequent statement, several hours later, that some armed attackers remain inside the medical facility and that while still ongoing, the situation is isolated to the clinic building. The Bagram airfield is not in danger, added Col. Sonny Leggett.

The spokesman also said that the Bagram air base perimeter was never breached but that some U.S. service members were evaluated for minor injuries as a result of the initial attack.

The Taliban control or hold sway over nearly half of Afghanistan, 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 armoured 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 that 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 commander 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.