IT TOOK just two nights of rioting in a single town to set the whole of France on edge. On July 19th and 20th angry rioters torched cars and bus shelters and attacked a police station in Trappes, near Versailles. This time the rioting was brought under control by the third night. But the French are keenly aware that a toxic mix of Islamism, joblessness and grievance can ignite copycat violence in the heavily immigrant banlieues. In 2005 weeks of rioting and car burning spread across the country’s banlieues, or outer-city housing estates, after the accidental deaths of two youths. The protests ended only after the government imposed a state of emergency.

The trouble in Trappes began after the police conducted a routine identity check on a woman on July 18th, asking her to remove her face-covering veil as French law requires. According to the Versailles public prosecutor, after a scuffle things turned nasty and the woman’s husband tried to strangle a policeman. The man concerned, a 21-year-old convert to Islam, later contested this on local television, insisting that he was only trying to defend his wife. He was promptly arrested, before being released pending a court appearance in September. The rioting started the evening after he was taken into custody, continuing for two hot nights during Ramadan.

Trappes is a poor place in a wealthy department (Yvelines), made up of market towns and neat commuter suburbs. With a big Muslim population, it has a history of hard-line Salafist Islam, which has been watched by French intelligence for years. Yet Trappes is also the home town of three French celebrities: Nicolas Anelka, a footballer, and Jamel Debbouze and Omar Sy, two film stars. In recent years the town has benefited from increased government spending on tearing down tower blocks and rebuilding lower-rise housing. Police identity checks on women wearing the face-covering veil there have passed off without incident.

Manuel Valls, the tough-talking Socialist interior minister, was quick to defend France’s secular law against face-covering, commonly referred to as the burqa ban, which was introduced by the previous, centre-right government in 2010. The law, Mr Valls said this week, “must be enforced everywhere”, arguing that it is “in the interests of women” to protect them from those who try to impose other values.

Although outsiders may see the burqa ban as a constraint on freedom of expression, France’s belief in laïcité, a tough form of secularism born of its historical fight against authoritarian clericalism, enjoys cross-party support. A ban on the wearing of all “ostentatious” religious symbols, such as the Muslim headscarf, in public schools was passed with Socialist support in 2004. Many French Muslim women approved of the burqa ban, on the grounds that the covering has no tradition in the northern African countries with historic ties to France, and had become a political statement, if not a tool, of those trying to impose hardline Islam.

In reality, very few women are thought to wear the burqa in France. In 2011 just 423 fully veiled women were stopped by the police, according to the Secularism Observatory, in a country that is home to 5m-6m Muslims. The application of the law itself was always going to be awkward. The police are generally suspect in many of the banlieues and people resent identity checks, even if, like most of them, they are not wearing burqas. This time the anger erupted in Trappes and had an apparently religious trigger. But France has plenty of other banlieues that could become flashpoints next time round—and for reasons that reach far beyond Islam.