The comments come as the U.S. bombs targets in and around the Libyan city of Sirte, in a notable expansion of the U.S.-led coalition's military mission against the Islamic State. Obama is assessing what's working and what's not in the fight against the Islamic State group as the U.S. military ramps up its engagement in Libya.

"In stark contrast to ISIL, which uses civilians as human shields, America's armed forces will continue to do everything in our power to avoid civilian casualties," the president said.

The president made his comments from the Pentagon after a Thursday meeting with his National Security Council. Obama said that America has been keeping "after ISIL aggressively across every front of this campaign."

"Tragically, however, we have also seen that ISIL still has the ability to direct and inspire attacks. ... In fact, the decline of ISIL in Syria and Iraq appears to be causing it to shift to tactics that we've seen before, an even greater emphasis on encouraging high-profile terrorist attacks, including in the United States," Obama said.

President Barack Obama said that while the Islamic State is losing ground in Syria and Iraq, it still has the ability to inspire attacks.

Obama said that while the U.S. is "conducting the most precise air campaign in history," civilian casualties are not taken lightly.

"After all it is the innocent civilians of Syria and Iraq who are suffering the most and who need to be saved from ISIL's terror and so when there are allegations of civilian casualties we take them very seriously," he said.

The president said that the campaign against ISIL is making progress, as the terrorist group continues to lose ground. Obama also said ISIL "has not had a major successful offensive operation in either Syria or Iraq in a full year."



"We'll keep hitting them and pushing them back and driving them out ... in other words, ISIL turns out not to be invincible. They are, in fact, inevitably going to be defeated," he said.

Obama said, however, that the terror group cannot be defeated by military force alone and that efforts to stabilize the region are necessary to prevent the group from returning and exploiting divides.

When a reporter asked the president if he was concerned that Republican presidential nominee Donald Trump is now receiving security briefings, he said that presidential nominees "need to get security briefings so that if they were to win, they are not starting from scratch in terms of being prepared for this office."

Obama said, however, that both nominees "have been told that these are classified briefings and if they want to be president, they have got to start acting like a president and that means being able to receive these briefings and not spread them around."

In June, Obama warned that terrorist groups like the Islamic State (also known as ISIS or ISIL) want to push the notion that "the West hates Muslims" as propaganda for recruitment. So, he argued, any U.S. actions that legitimize that notion are playing right into those groups' hands.

— The Associated Press and CNBC's Everett Rosenfeld contributed to this report.