WASHINGTON — President Barack Obama acknowledged Friday that “civilians were killed that shouldn’t have been” in past U.S. drone strikes, but said the administration is now “very cautious” about striking where women or children are present.

Obama was asked at a news conference about an increase in the number of people targeted in drone strikes against extremists in Libya, Syria, Somalia and elsewhere.

“In the past, there was legitimate criticism that the legal architecture around the use of drone strikes wasn’t as precise as it should have been,” Obama said. “There’s no doubt that civilians were killed that shouldn’t have been.”

He added that over the last several years, the administration has worked to prevent civilian deaths.

“In situations of war, you know, we have to take responsibility when we’re not acting appropriately,” Obama said.

Recent drone and other airstrikes against extremist targets have killed large numbers of people. A strike on an Islamic State training camp in western Libya in February killed more than 40 people; a drone strike in Somalia against al-Shabab on March 5 killed 150 people. Another drone strike, in Yemen in February, killed dozens.

The U.S. came under heavy criticism for a drone strike several years ago against extremists in Yemen, which critics said actually hit a wedding party and killed women and children.

In October, an AC-130 gunship mistakenly hit a hospital in Afghanistan that was run by the charity organization Doctors Without Borders. The group has demanded that the strike be investigated as a war crime. The Pentagon disciplined several officers and enlisted personnel for their part in the attack.

Obama said Friday the U.S. uses “vigorous criteria” for getting intelligence on targeting, and that intelligence is “checked, double-checked, triple-checked before kinetic actions are taken.”

He said the U.S. is targeting camps that are clearly “involved in and directing plots that could do the United States harm or are supporting ISIL activities or al-Qaida activities.”

Then, he said, “a strike will be taken.”