I SLAM FRIGHTENS many in the West. Jihadists kill in the name of their religion. Some Muslim conservatives believe it lets them force their daughters to marry. When asked, Westerners say that Islam is the religion they least want their neighbours or in-laws to follow. Bestselling books such as “The Strange Death of Europe”, “Le Suicide Français” and “Submission” warn against the march of Islam.

Fear of terrorism, not least the danger that jihadists returning from Syria will cause bloody havoc at home, and the rise of anti-immigrant populism are leading governments to try to control Muslims. President Donald Trump has banned travellers from some Muslim-majority countries; France and other states have banned Muslim head- or face-coverings.

However, Western Islam is undergoing a little-noticed transformation. As our special report this week sets out, a natural process of adaptation and assimilation is doing more than any government to tame the threat posed by Islamic extremism. The first generation of Muslim workers who migrated to the West, starting in the 1950s, did not know how long they would stay; their religious practices directed by foreign-trained imams were tied to those of their countries of origin. The second generation felt alienated, caught between their parents’ foreign culture and societies whose institutions they found hard to penetrate. Frustrated and belonging nowhere, a few radicals turned to violent jihad.

Today the third generation is coming of age. It is more enfranchised and confident than the first two. Most of its members want little truck with either foreign imams or violent jihadist propaganda. Instead, for young Muslims in the West, faith is increasingly becoming a matter of personal choice. Their beliefs range from ultra-conservative to path-breakingly liberal. Some prominent scholars allow female converts to keep non-Muslim husbands; a few congregations conduct weekly prayers on Sundays, because the faithful go to work on Fridays; there are even women-led mosques. At the same time Western institutions are gradually opening up to Muslims. London and Rotterdam are both run by Muslim mayors. Two Muslim women, one of them veiled, were voted into the United States Congress last year.

How can Western governments encourage this transition? Their main task is to focus on upholding the law rather than try to force Muslims to change their beliefs. The West is enjoying a decline in attacks by jihadists. The number they killed in Europe fell from over 150 in 2015 to 14 last year. Attacks not only threaten lives and property, they also set back relations between Muslims and those around them. That is why criminality must be dealt with firmly by the law and the intelligence services. The trouble is that governments frequently lump in criminal actions with regressive norms. Germany is leading a drive to curb foreign influence of mosques, train imams and control funding. France wants to cajole Muslims into a representative body. They are echoing the Muslim world, where Islam is often a state religion that is run, and stifled, by governments. However, the top-down nannying of religion risks a backlash. Heavy-handed interference will alienate communities whose co-operation is needed to identify potential terrorists and abusers among them. Put on the defensive, Muslims will deepen communal identities and retreat into the very segregation that intervention is supposed to reverse. Rather than intervene in doctrine, it is better to deal with social conservatism through argument and persuasion. That can make for testy debate. This week Ilhan Omar, a Democratic congresswoman from Minnesota, had to apologise for peddling anti-Semitic tropes. The trickiest balance is over how to counter the radicalisation of Muslims, whether online or in prisons. This often involves vulnerable young people becoming more devout before turning to violence. But there are signs of progress. Although young Muslims are conservative by the standards of Western society (eg, on gay schoolteachers), they are more liberal than their elders.

Islam belongs to Western history and culture. Muslims have governed parts of Europe for 13 centuries; they helped kindle the Renaissance. If today’s varied and liberal form of Islam continues to flourish, it may even serve as an example of tolerance for the rest of the Muslim world.