A U.S. drone strike on a terrorist compound in Pakistan in January accidentally killed two Westerners being held hostage, including an American aid worker, the White House said Thursday.

The drone strike in the Pakistan-Afghanistan border region accidentally killed Dr. Warren Weinstein, an American held by al Qaeda since 2011, and Giovanni Lo Porto, an Italian national who had been held hostage since 2012. It’s believed to be the first time that the CIA’s drone operations in Pakistan have killed an American.

An American al Qaeda member also was killed in the strike, and another American-born terrorist was killed in a different operation, U.S. officials said.

At a hastily arranged appearance at the White House, President Obama said the operation was “fully consistent” with U.S. guidelines for counterterrorism strikes in the region, and he blamed the episode on the “fog of war.” He said he has ordered a review to make sure it doesn’t happen again.

“We believed that this was an al Qaeda compound, that no civilians were present, and that capturing these terrorists was not possible,” Mr. Obama said. “What we did not know, tragically, is that al Qaeda was hiding the presence of Warren and Giovanni in this same compound. It is a cruel and bitter truth that in the fog of war generally, and our fight against terrorists specifically, mistakes, sometimes deadly mistakes, can occur.”