News that the attacker who killed at least 84 people in France was a Tunisian citizen and a Muslim legally working in the country quickly became ammunition for American politicians suggesting that the United States also faces a serious threat from within.
Donald Trump, the presumptive Republican presidential nominee, reiterated his call to ban Muslims from entering the country. Former House Speaker Newt Gingrich recommended that Muslims be deported if they believe in Islamic law.
But France and the United States are markedly different in their relationships with their Muslim immigrant populations, with several factors making the threat of organized Islamist extremism — as opposed to attacks by individuals who were simply inspired by the ideology — more likely in France. They include the country's colonial history in North Africa, its insistence on assimilation and the greater isolation of its Muslim communities.
In addition, France's proximity to the Middle East increases the chances that young men may have traveled to Syria to join Islamic State militants and then returned to France with the intent to carry out attacks like the ones that took place in Paris last year. However, no evidence has emerged to suggest that was the case in the deadly assault Thursday in Nice, in which the assailant drove a truck through a crowd celebrating Bastille Day.
France does not collect census data on religious affiliation, but it estimates that Muslims make up 5% to 10% of its 65 million people, which would give it the largest Muslim population in Western Europe.
Many trace their roots to Algeria and Tunisia, both former French colonies. Their parents and grandparents arrived as immigrant laborers to help rebuild France after World War II — with more than 470,000 coming from Algeria alone by 1968. Over the next dozen years, that number reached 800,000.
Their arrival, however, had an ugly backdrop: For more than a century, the colonies were locked in a vicious fight with France for independence. Battling brutal repression by the French, the insurgents latched on to Islam as a organizing tool.
Algeria and Tunisia became the birthplace of some of the earliest militant Islamist groups. It is little surprise to experts that today Tunisia is the largest supplier per capita of Islamic State recruits to Syria.
By the time Algerian independence came in 1962 — six years after Tunisian independence — France's relationship with its Muslim immigrants from North Africa was showing signs of trouble.
As their construction and manufacturing jobs began to dry up, many recommitted to their religion as a way of restoring their sense of dignity, said Gilles Kepel, a French political scientist and Islam specialist. Ever since, social mobility has been severely limited.
France struggles much more than the U.S. to absorb its immigrants.
Muslims in France today — even second and third generation — are concentrated in their own enclaves, suburbs known as banlieues that are usually little more than a cement jungle of decrepit high-rises where frustration is the dominant feeling.
Clichy-sous-Bois was the epicenter of race riots in 2005, when two teenagers, the children of African immigrants, were electrocuted while hiding from the police in a power station. Though the suburb is only 10 miles from central Paris, it takes more than an hour to reach due to the absence of a rail link. Its cafes are more likely to serve Moroccan mint tea and merguez sausages than French cafe and croissants.
Children of immigrants identify as French and bristle at questions about their origin. But they also complain of not enjoying the same opportunities as other French citizens.
"Muslims or people perceived as such do not have equal access to education, jobs, housing or even healthcare," Yasser Louati, a spokesman for the Collective Against Islamophobia in France, said in an interview via social media on Friday.
"You can't tell generations of kids 'You don't belong here' and be surprised they grow up like they don't belong here."
The divisions appear to be worsening. In 2011, a government-sponsored study found that the children of immigrants were twice as likely as their parents to report a sense of discrimination linked to origin, even though they speak French fluently.
The ideal of diversity espoused in the United States has not been embraced in France, where being seen as French means giving up the culture where you came from.
Kepel, the political scientist, has written that the French government sees Islam as an impediment to Muslims becoming fully integrated citizens.
It has discouraged — and in some cases banned — certain forms of religious expression in an attempt to promote assimilation and unity.
In 2004, the French Assembly passed a law prohibiting the wearing of conspicuous religious symbols in public schools. The controversy dates back to at least 1989, when a high school principal barred three girls from wearing the hijab on school grounds because it violated France's tradition of secular education.
But critics say those policies have had the opposite effect, deepening a feeling among some Muslims that the government is anti-Islam and they will never be fully accepted.
The relationship between French Muslims and their countrymen has only become more fraught amid terrorist attacks claimed by Islamic State.
Bulos is a special correspondent.