A U.S. drone strike in January targeting an al-Qaida compound in Pakistan near the Afghan border inadvertently killed an American and an Italian who had been held hostage for years by the group, U.S. officials said on Thursday.

President Barack Obama apologized and said he took "full responsibility" for all counterterrorism operations, including this one.

The deaths were a setback for a longrunning U.S. drone strike program that has targeted Islamist militants in Pakistan, Afghanistan and elsewhere, often prompting criticism inside those countries as well as from civil liberties groups in the United States.