U.S. Defense Secretary Ash Carter is promising a full and transparent investigation into whether a U.S. aircraft providing air support for American and Afghan special operations forces in Afghanistan was responsible for the explosions that destroyed a hospital and killed 22 people.

Carter tells reporters traveling with him in Spain that the situation is "confused and complicated" right now.

U.S. officials say American special operations forces advising Afghan commandos in the vicinity of the hospital requested the air support when they came under fire in the northern city of Kunduz. The officials say the C-130 gunship responded and fired on the area, but it's not certain yet whether that was what destroyed the hospital.

The officials were not authorized to discuss the incident publicly and spoke on condition of anonymity