KABUL, Afghanistan (AP) -- KABUL, Afghanistan - The U.S. and Afghan governments vowed Sunday to jointly investigate the attack on a hospital in Kunduz that killed 22 people, as street-by street battles continued between government forces and Taliban fighters and officials warned of a looming humanitarian crisis for civilians trapped in the city
Amid accusations that U.S. jet fighters were responsible for what Doctors Without Borders said was a "sustained bombing" of their trauma center in Kunduz, President Barack Obama and Afghanistan's President Ashraf Ghani promised investigations. Obama said he expected a full accounting of the circumstances surrounding the bombing, and that he would wait for those results before making a judgment. He said the U.S. would continue working with Afghanistan's government and its overseas partners to promote security in Afghanistan.
Some top U.S. officials said the circumstances surrounding the incident remain murky, but others indicated the U.S. may have been responsible. Army Col. Brian Tribus, a spokesman for American forces in Afghanistan, said Saturday that a U.S. airstrike "in the Kunduz vicinity" around 2:15 a.m. Saturday morning "may have resulted in collateral damage to a nearby medical facility."
U.S. officials speaking on condition of anonymity said American special operations forces advising Afghan commandos in the vicinity of the hospital requested the air support when they came under fire in Kunduz. The officials said the AC-130 gunship responded and fired on the area, but U.S. Secretary of Defense Ash Carter said it's not certain yet whether that was what destroyed the hospital.
The officials were not authorized to discuss the incident publicly. They also said the senior U.S. military investigator is in Kunduz but hasn't yet been able to get to the site because it continues to be a contested area between the Afghans and the Taliban militants.
Carter, speaking to reporters traveling with him on a trip to Spain, said, "The situation there is confused and complicated, so it may take some time to get the facts, but we will get the facts."
Carter said he believes the U.S. will have better information in the coming days, once U.S. and international investigators get access to the hospital site.
Doctors Without Borders issued a statement Sunday expressing its "clear assumption that a war crime has been committed," after earlier saying that "all indications" were that the international coalition was responsible for the early Saturday morning bombing. While NATO maintains a significant military role in Afghanistan, airstrikes are conducted by U.S. forces
Christopher Stokes, the charity's general director, said the organization is demanding an independent investigation and may not be satisfied with an inquiry conducted by the U.S. and Afghan governments.
Using the organization's French acronym, Stokes said, "MSF demands that a full and transparent investigation into the event be conducted by an independent international body. Relying only on an internal investigation by a party to the conflict would be wholly insufficient."
The charity said that the main hospital building in the sprawling compound, "where medical personnel were caring for patients, was repeatedly and very precisely hit during each aerial raid, while the rest of the compound was left mostly untouched." It earlier said that bombing had lasted an hour, and repeated calls to NATO and the U.S. military to call off the strikes had failed.
On Sunday, the organization announced that three injured hospital patients had died, bringing the total death toll to 22, including 12 hospital staffers. It earlier said that three of the dead were children in the intensive care unit. The charity also announced it was withdrawing from Kunduz.
Afghan officials said earlier that helicopter gunships had returned fire from Taliban fighters who were hiding in the hospital. But Kate Stegeman, the charity's communications manager, said there were no insurgents in the facility at the time of the bombing.
Meanwhile the humanitarian crisis in the city, which briefly fell to the Taliban last week before the government launched a counteroffensive, has been growing increasingly dire, with shops shuttered because of ongoing fighting and roads made impassable by mines planted by insurgents.
The Taliban seized Kunduz last Monday but have since withdrawn from much of the city after a government counterattack. Sporadic battles continue as troops attempt to clear remaining pockets of militants.
The Taliban's brief seizure of Kunduz marked the insurgent group's biggest foray into a major urban area since the 2001 U.S.-led invasion ended their rule.
Afghan forces have been struggling to combat the Taliban since the U.S. and NATO shifted to a support and training role at the end of last year, officially ending their combat mission in the war-torn country.
A Kunduz resident who gave his name only as Habibullah said the Afghan flag was flying over the central square - contrary to reports that it had been retaken by the insurgents. Gun battles were being fought in three districts on the outskirts of town, he said.
Acting provincial Gov. Hamidullah Danishi said most of the insurgents had fled the city and that those still standing their ground appeared to be what he called "foreigners," non-Afghans who have been boosting Taliban forces in the north of the country for some months. Officials have said that many of them are from Central Asian states, members of the Islamic Movement of Uzbekistan.
Danishi said that 480 Taliban fighters had been killed as of Friday, and around 300 wounded. He put casualties among Afghan security forces at between 30 and 35 killed or wounded.
Thousands of civilian residents remain trapped inside the disputed city. Local television showed live footage of police officers handing bread to children, one of whom said he had not eaten for three days.
The deputy head of the Afghan National Disaster Management Authority, Aslam Sayas, said he was aware of the growing humanitarian crisis inside Kunduz. "We are waiting for the security situation to improve to give us an opportunity to reach those needy people," he said.
Saad Mukhar, the Kunduz provincial public health director, estimates that more than 70 people have been killed and more than 500 wounded in the city since the fighting began.
"I'm afraid that if this situation continues, we will not be able to help our patients because right now we are facing a serious, drastic shortage of medicine," he said.
Associated Press writers Humayoon Babur and Rahim Faiez in Kabul, Afghanistan and Lolita C. Baldor in Madrid contributed to this report.
This story deletes a reference to weaponry in the hospital windows as seen in AP video after further review of the images cast doubt on whether they were rifles and a machine gun or simply charred debris from the bombing.