WITH home-made rabbit pâté and fresh cuts of meat, Rémy Mirleau’s boucherie typifies local France, like the tricolour above the town hall. But in Trappes, a formerly Communist-run town south-west of Paris, Mr Mirleau’s butcher’s shop is known for another quality: as the only non-halal one. With a big Muslim population, Trappes exemplifies what Manuel Valls, the French prime minister, has provocatively called “territorial apartheid”. Yet the town also reveals the complex links between segregation, an assertive secular state and the rise of jihadism.

A working-class enclave that grew up around a railway yard, Trappes has the vibrant mix of languages and faiths that is common in many banlieues around French cities. The share of children born to at least one foreign-born parent in Trappes jumped from 9% in 1968 to 61% in 2005, say demographers. Once heavily Portuguese, today’s population mostly has family roots in Morocco and Algeria. Nearly two-thirds of housing is publicly owned. The poverty rate of 24% in Trappes is almost twice the average for the Paris region. On the housing estates of Les Merisiers, near a new mosque fringed by mini-palms, it is 42%.

The government says such pockets have become a problem in themselves. “The risk in these territories,” said Mr Valls, a one-time mayor of a multicultural banlieue, is that “extremism, criminality and radical Islam find fertile ground”. He argued that France, which bans the collection of ethnic statistics, should face up to the de facto segregation in its suburbs. He is especially worried by the connection between criminality, armed gangs and drug-dealing, and jihadism. Amédy Coulibaly, who shot dead four Jewish shoppers and a policewoman in January’s terror attacks, grew up on a rough estate in Grigny, south of Paris, and did time for armed robbery. Mr Valls says there are 50-100 similar ghetto-like areas in France.

In Trappes, however, the picture is not one of straightforward neglect. Like many banlieues, the town has benefited from vast amounts of public money pumped in by governments after riots in 2005 led to a state of emergency. Since 2006 some €350m ($400m) has been spent renovating tower blocks and digging new roads. A developer is putting up private housing, as part of an effort to lure better-off types. In Les Merisiers, cycle paths have been laid out along avenues planted with saplings. A revamped gym and well-equipped primary schools are adorned with the French motto “Liberty, Equality, Fraternity”. On the main square stands a brand-new post office and a gleaming business centre for start-ups. Across the road, in a deliciously French twist, the Maghnaoui butcher’s shop sells halal foie gras.

Such changes have improved daily life. Town-hall staff talk of a return of “dignity”, and note that the freshly painted walls of the estates are, so far, free of graffiti. Yet Trappes remains troubled. In the summer of 2013 riots broke out after a man violently resisted a police check on his wife, who was wearing a face-covering veil, which is banned in public in secular France. Soon after the attacks in January, two young men left Trappes for jihad, presumably in Syria. One had a job at the town hall supervising after-school activities.

“Poverty does not explain everything,” says Guy Malandain, the Socialist mayor. “It’s as much a question of ideological excess and manipulation.” Nothing about the town-hall employee suggested he was preparing for jihad; he had no previous record. Young people receptive to a hard-talking Islamist message, spread by networks of recruiters, seem to be in a discreet but angry search for an identity and purpose that, to their mind, France denies them. France has supplied more jihadis (some 1,400) to Syria and Iraq than any other European country (though Belgium has sent more per head of population). Prison seems a particularly efficient incubator.

Perhaps the most delicate ingredient in all this is laïcité, a tough French brand of secularism entrenched by law in 1905. Born of bloody anticlericalism and revolutionary ideals, it is considered by left and right alike as a powerful force against extremism. But on the estates of towns like Trappes, it is often seen as a cover for measures that are anti-Islam.

Under French freedom-of-speech laws, for instance, blasphemy is not forbidden (no religious idea is protected from insult), whereas anti-Semitic hate speech is outlawed (for inciting violence against others). Charlie Hebdo, the satirical newspaper where 12 people were shot dead on January 7th, was able to publish caricatures of Muhammad, as well as the pope. But why, ask locals, is it acceptable to insult the prophet but not to make jokes about Jews? A well-known black comedian is on trial for hate speech and anti-Semitism. Conspiracy theories are rife. “The immense majority of Muslims here are peaceful,” says Othman Nasrou, an entrepreneur and local councillor. “But there’s a significant minority that is ‘not Charlie’, and thinks laïcité is anti-religion and anti-Islam.”

President François Hollande says he wants to reinforce laïcité, notably in the classroom. Dozens of schools reported disruption during a national minute’s silence after the attacks on January 7th, exposing the gap between the outpouring of national sympathy on the streets of Paris and the angry defiance in some banlieues. But it will be hard to apply secular rules evenly. Malek Boutih, an outspoken Socialist deputy, accuses local mayors of turning a blind eye to breaches of the law in the banlieues in the name of social peace.

Back in Trappes, Bachir Hajjoubi prepares to collect his children from school. The son of a Moroccan labourer, he has an administrative job in a glass-engraving works in Mesnil-le-Roi, an hour away by train, and coaches boys in football. “I love France,” he says. But he worries about youngsters who “become radicalised through rejection”. Was Mr Valls right to speak of apartheid? His words were “a bit strong, but also a bit true”. The paradox lies in the solution that Mr Hajjoubi has found for his own sons. He took them out of the local state primary and put them into a private Catholic school—where, with a big share of Muslim pupils, ethnic and religious diversity thrives.