At a joint press conference at the White House with British Prime Minister David Cameron, President Obama warned Europe to better integrate its Muslim immigrants to help avoid terrorist attacks such as those France suffered last week.

Obama insisted that stopping violence can’t be only a matter of security.

“I know David joins me when I say that we will continue to do everything in our power to help France seek the justice that is needed, and that all our countries are working together seamlessly to prevent attacks and to defeat these terrorist networks,” Obama said.

Noting that groups like al Qaeda and ISIS are working to recruit disaffected Europeans to engage in terrorism at home, Obama pointed to the U.S. to show how integration can work.

“Our biggest advantage, major, is that our Muslim populations feel themselves to be Americans and there is this incredible process of immigration and assimilation that is part of our tradition,” the president said.

“There are parts of Europe in which that’s not the case,” Obama continued. “It’s important for Europe not to simply respond with a hammer and law enforcement and military approaches to these problems.”

Prime Minister Cameron, though, demurred from any claim that mere integration is the cure.

“You can have, tragically, people who have had all the advantages of integration, who have had all the economic opportunities our countries can offer, who still get seduced by this poisonous, radical death cult of a narrative,” Cameron said.

The Prime Minister said the battle facing the West is a “long, patient and hard struggle” and that the enemy is a “poisonous fanatical death cult … perverting the religion of Islam.”

Cameron also announced that Britain and the U.S. have agreed to set up a “joint group to identify what more we can do to counter the rise of domestic violent extremism and to learn from one another.”

Follow Warner Todd Huston on Twitter @warnerthuston or email the author at igcolonel@hotmail.com