President Barack Obama asserted that it was impossible for the United States to lose the war with the Islamic State, but cautioned Americans against defeating themselves in the war by betraying American values.

“ISIL can’t defeat the United States of America or our NATO partners,” he noted. “We can defeat ourselves though if we make bad decisions.”

Obama alluded to the rhetoric and proposals of Republican presidential nominee Donald Trump, suggesting that killing civilians and creating religious tests for entry in the United States would be “offensive” to the world.

“Those kinds of strategies can end up backfiring,” he said. “Because in order for us to ultimately win this fight, we cannot frame this as a clash of civilizations between the West and Islam, that plays right into the hands of ISIL and the perverse interpretations of Islam they’re putting forward.”

Trump has repeatedly called for the United States to “bomb the shit out of ISIS” and implement a temporary ban on immigrants from Muslim countries.

Obama said that his strategy was to “keep grinding away” and “keep our eye on the ball” and that eventually the United States would win against ISIS.

He added that the United States and international partners needed to do more to stop the spread of ISIS networks across the world and prepare for more threats in America.

“Those networks are more active in Europe than they are here,” he said. “But we don’t know what we don’t know and it is conceivable there are networks here that could be activated.”