The United States military has expressed "deepest condolences" to the civilians killed in an airstrike on a hospital in Kunduz, Afghanistan.
Pentagon official General John Campbell says that Afghan forces said they were taking fire from enemy positions and asked for air support.
General Campbell said the Taliban for "fighting within the city" that put civilians in harm's way, and US advice and air support would still be available for Afghan forces despite the tragedy.
"We have now learned that on 3rd October Afghan forces advised that they were taking fire from enemy positions and asked for air support from U.S. forces," Campbell said. "An air strike was then called to eliminate the Taliban threat and several civilians were accidentally struck."
He did not specify if the air strike had struck the Medecins Sans Frontieres hospital.
The deadly air strike on Saturday killed 22 people when it hit the medical facility.
Investigations by Nato and Afghan forces will be carried out, Campbell said.
Medical aid group Medicens Sans Frontieres (MSF) has called for an "independent international body" to investigate the air strike that killed 22 people at its hospital in Kunduz, Afghanistan.
"Under the clear presumption that a war crime has been committed, MSF demands that a full and transparent investigation into the event be conducted by an independent international body," Christopher Stokes, MSF General Director said.
The group earlier denied that Taliban fighters were firing from its hospital at Afghan and Nato forces before the strike, which is thought to have been carried out by US planes.
MSF also updated the death toll from the attack, saying that 12 staff member and ten patients were killed, including three children.
We reiterate that the main hospital building, 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.
We condemn this attack, which constitutes a grave violation of International Humanitarian Law.
Medical charity Doctors Without Borders - or Medecins Sans Frontieres (MSF) - has withdrawn from of Kunduz following the bombing of its hospital in the northern Afghan city.
The deadly air strike on Saturday killed 19 people when it hit the medical facility.
Kate Stegeman, the group's communications manager, said some staff are still working in other health facilities in the city, where troops have been battling Taliban fighters.
The international charity tweeted a message of thanks on Twitter to those who had supported the group and sent messages of condolencesince the tragedy.
Investigations are continuing into the bombing of the hospital.
Medical charity worker relates how he and colleagues tried to save patients and staff following devastating air strike.Read the full story ›
US President Barack Obama has offered his "deepest condolences" to the medical staff and civilians killed and injured in the bombing of the MSF hospital in Kunduz, Afghanistan.
A statement from the White House said that the Department of Defence had launched a "full investigation".
"Michelle and I offer our thoughts and prayers to all of the civilians affected by this incident, their families, and loves ones," the statement said.
"We will continue to work closely with President Ghani, the Afghan government, and our international partners to support the Afghan National Defence and Security forces as they work to secure their country."
The US military has said it conducted an airstrike "in the vicinity" of a MSF hospital in Kunduz, Afghanistan.
The airstrike was conducted against insurgents who were firing on US service members assisting Afghan forces in Kunduz, the US military said.
A video has emerged which shows the devastation caused by the airstrike on the hospital in Kunduz, Afghanistan.
MSF said the death toll now stands at 19, including 12 staff members from the aid organisation and seven patients, including three children.
The head of US-led forces in Afghanistan offered condolences to the country's president after a hospital was bombed, the president's office said.
The office had earlier said Army General John Campbell apologised to President Ashraf Ghani, but it later retracted the statement.
A spokeswoman for the international coalition could not immediately confirm that Campbell phoned Ghani but said she was checking.
MSF have said the bombing on the hospital in Kunduz that killed 19 people was likely carried out by coalition forces.
A statement said: "This attack constitutes a grave violation of International Humanitarian Law.
"All indications currently point to the bombing being carried out by international Coalition forces."
The aid agency also called for an independent investigation of the attack to "ensure maximum transparency and accountability".
A MSF staff member who managed to escape the bombing raid on the hospital in Kunduz has told of his horror as he saw the building "engulfed in flames".
Heman Nagarathnam, MSF Head of Programmes in northern Afghanistan said: “The bombs hit and then we heard the plane circle round."
There was a pause, and then more bombs hit. This happened again and again. When I made it out from the office, the main hospital building was engulfed in flames. Those people that could had moved quickly to the building’s two bunkers to seek safety. But patients who were unable to escape burned to death as they lay in their beds.
The aid agency said the hospital was bombed in a series of raids at approximately 15 minute intervals between 2:08am until 3:15am local time.