He was face down on the steering wheel, with a bullet wound in the back of his head. The car windows were smashed. Blood was smeared over its seats and dashboard. When police identified the victim as 52-year-old Christian Poveda, they confirmed what onlookers already suspected: this wasn't just random murder, it was a gangland execution.

Poveda, a French documentary-maker, was gunned down in the early hours on Wednesday as he drove through Tonacatepeque, a semi-rural area 10 miles outside San Salvador. It was a senselessly violent end to a career spent exposing the senseless violence that has for years plagued El Salvador for years.

The killing was also predictable. Poveda had made himself a marked man, thanks to his film La Vida Loca (Crazy Life), which chronicled daily life among the 30,000-odd gang members whose activities have turned the tiny Central American nation of 5.5 million into one of the most dangerous places in the Western hemisphere, outside of a war zone.

Download the new Independent Premium app Sharing the full story, not just the headlines

Such had been the impact of the 90-minute documentary, exposing the dangerous lives and depressing backgrounds of tattooed gang members who battle for control of drug, prostitution and extortion rackets, that his murder sparked an immediate wave of political revulsion.

El Salvador's new President, Mauricio Funes, said he was "shocked" and "devastated," and vowed to crack down on gang violence. The Public Safety Minister, Manuel Melgar, announced that he deplored the "repugnant and reproachable criminal act" and vowed police would work tirelessly to find the killers.

They may not have far to look. Poveda died en route from La Campanera, a suburb regarded as a stronghold of the notorious Mara 18, a gang known as "la dieciocho" whose long-running turf war with the Mara Salvatrucha claimed an estimated 3,700 of the staggering 5,000 lives lost to gang violence in El Salvador last year.

He'd already spent 16 months in the area making La Vida Loca, which has been televised locally and hits French cinemas later this month. The compelling film shows disturbing images of gang members shot in the streets, relatives crying over coffins, public beatings, and young men and women with faces covered by tattoos of gang logos.

Poveda witnessed seven murders during filming and three of the victims featured heavily in the documentary. Their stories were often bizarrely touching. In part of the film, he follows "Wizard," a young mother who had lost her eye in a fight and is interviewed undergoing a series of treatments to be fitted with a glass eye. She is later shot and killed.

Another tale which portrays the ugly pointlessness of gang life revolves around "Little One", a 19-year-old woman who joined a gang because the alternative was unemployment and poverty. She was once pretty; now she has a tattoo of the number 18 stretching from her eyebrows to her cheeks.

"I knew right from the start that I couldn't film just one character, for a variety of reasons," Poveda said in an interview about the film. "Firstly they get bored after a couple of months and don't want to be filmed any more. Secondly they get put in jail. Or thirdly, they get killed."

Daily coronavirus briefing No hype, just the advice and analysis you need Enter your email address Continue Continue Please enter an email address Email address is invalid Fill out this field Email address is invalid Email already exists. Log in to update your newsletter preferences Register with your social account or click here to log in I would like to receive morning headlines Monday - Friday plus breaking news alerts by email Update newsletter preferences

The result of his efforts was a brilliantly reviewed film which had an impact that went beyond grim voyeurism, highlighting the social neglect and poverty that turns young Salvadoreans to crime. It has yet to secure a UK release, but has been widely feted on the European film festival circuit.

"We have to understand why a 12- or 13-year-old child joins a gang and gives his life to it," said Poveda, when asked what lesson he wanted viewers to draw from the film. "[They] have terrible family problems or come from poor families who don't have time to take care of their children. They are victims of society, our society."

At times, La Vida Loca – which gets its name, bizarrely, from a Ricky Martin pop song – sets itself at odds with the forces of law and order. It is highly critical, for example, of a police crackdown on gang members that resulted in one of Poveda's subjects, "Moreno", sent to prison for homicide – and simultaneously led to a huge increase in local violence.

The film also provides a history lesson. El Salvador's violent present has its roots in a brutal civil war that began in 1979, when Communist revolutionaries attempted to overthrow a US-sponsored military junta that had seized power. The conflict lasted 13 years, and saw 75,000 people killed, including 35,000 civilians.

When the fighting stopped, an impoverished and divided country was left behind. Its problems were aggravated when the US began expelling thousands of refugees. Many of the deportees were gang members. Thousands had served prison sentences in America. Today, El Salvador's gang violence is controlled by these men and women and financed by drug exports to the US. It is carried out by weapons bought there.

"Gangs are the result of catastrophic policies used in El Salvador, as well as by the United States," Poveda told The Los Angeles Times. "It's important to understand that the US bears [some of] the blame for all this."

Poveda was a prominent journalist before he became a film-maker. The son of refugees from the Spanish Civil War, who was brought up in France in the 1960s, he first came to El Salvador as a photographer for Time magazine. He later covered wars in Iran, Iraq, Lebanon and other countries before returning in the 1990s to dedicate himself to documenting the Salvadoran gangs. No one knows exactly what lay behind his murder this week. Indeed, he was thought to have a constructive working relationship with the bosses of most major gangs. However some colleagues believe his close contact with Mara 18 might have angered members of Mara Salvatrucha.

"Christian was not overly worried until recently," said a fellow journalist Alan Mingam, who issued a tribute through Reporters Without Borders. "His film had been shown on [television] and pirate copies were circulating in Salvador, sold for a euro each. Some gangs then accused him of making business out of them, but the bosses calmed them down.

"He had real recognition in this world, and the gangs sometimes asked him to act as a mediator. Even the President... consulted him on the way in which to make progress."

Recently, amid widespread debate over his film, Poveda had even said that he trusted El Salvador's gang members. "As savage as they can be, they're people of their word. They're very well structured organisations, and the decision made by a gang is the final one. From the moment I understood that, I had no problems. I was never afraid of them."

Maybe, in the ugly world of El Salvador's notorious gangs, he was ultimately guilty of trusting people a little bit too much.

Victims of their convictions

* While cycling to work in Amsterdam in November 2004 , the Dutch film-maker Theo van Gogh was shot and then stabbed to death by Mohammed Bouyeri, a radical Islamist. A critic of fundamentalist Islam, Van Gogh had released Submission, a film about abuse against Muslim women.

* Roberto Saviano exposed the secrets of the Neapolitan mafia in his best-selling book Gomorrah (which later became a film of the same name). He now lives under police protection in fear of his life.

* Taslima Nasrin has been living in exile from her native Bangladesh since 1994, after receiving death threats from Islamist groups and being charged with blasphemy following the publication of her novel Lajja (Shame) in 1993.