Night after night, throngs of kids steal cars on the outskirts of Riyadh. They remove the number plates, add stickers to the bodywork and use the cars to swerve at high speeds through the Saudi Arabian capital. At 150mph the slightest mistake can have dramatic consequences. Accidents are frequent and spectacular. Deaths and injuries are common.

The phenomenon – known as tafhit in colloquial Saudi Arabic and celebrated by MIA in the video for her 2012 single Bad Girls – is not new. Saudi youth have raced cars since the 1970s oil bonanza, which brought the country spotless roads, Japanese sedans and unheard-of economic inequalities. Inevitably, it is a male‑dominated subculture but some women joyride too.

In a country where youth unemployment stands at more than 30%, and where who you know is far more important than what you know, joyriding has become one way to express their anger and frustration.

The governor of Riyadh first outlawed the phenomenon in the early 1980s. Now an open war rages between joyriders and the police. When they cross paths with a police patrol, joyriders often throw eggs or stones – eggs cover windscreens with a thick, opaque glaze that forces the police to stop their pursuit and wipe them clean.

Young people occasionally attack police stations and the cops arrest them in their hundreds. In the mid-1990s, official statistics showed a new case of joyriding every 11 minutes, on average. In the three first months of 2014 alone, the Riyadh police arrested 750 youths for taking part in joyriding events.

Police pressure has done little to reduce the practice and Riyadh's force has teamed up with sociologists and criminologists. An anti-joyriding unit has been created, where PhD-holders write research articles about cars, youth boredom and unrest. But the crackdown has only encouraged the joyriders to become even more creative. They use a variety of tactics to dodge the police – and the police, in turn, take driving lessons from jailed joyriders.

The authorities are especially keen to fight joyriding because a number of its devotees have become armed militants, and joined up with Afghan and Iraqi fighters. The most famous of them, Yusef al-Ayeri, earned his spurs as a joyrider on the streets of Dammam, a city in the country's Eastern Province, where he was known as "Abu Saleh".

Al-Ayeri dropped out of school in 1991, flew to Afghanistan, became a bodyguard for Osama bin Laden and created the Saudi branch of al-Qaida in the late 1990s. Before being killed by Saudi security forces in 2004, he wrote strategic treatises that show an intimate knowledge of Richard Nixon's memoirs, the theories of political scientist Francis Fukuyama and the writings of Thomas Friedman.

His trajectory shows that there is no single path that leads a person to become an armed militant. And Al-Ayeri's case is not an isolated one. Militants appear to view joyriders as potential footsoldiers of the future. Unlike academics, religious figures and human rights activists, joyriders confront the security forces in the real world on a day-to-day basis. Sometimes they even inflict painful defeats. Their story is crucial to building an understanding of everyday violence and rebellion in the Middle East.

• To order Joyriding in Riyadh: Oil, Urbanism and Road Revolt by Pascal Menoret for £18.99, with free UK p&p, go to guardianbookshop.co.uk