Once upon a time it would have taken scores of dedicated people and an awful lot of hard work and travel to incite riots in two dozen countries half a world away. But, as events of the past six days have shown, a few extremists in California can now do it without even crossing the state line.

Fresh revelations yesterday enabled to be pieced together for the first time the inside story of the anti-Islamic film that has caused mayhem around the globe, and led to the deaths of around a dozen people, including Chris Stevens, the US ambassador to Libya. The tale involves Nakoula Basseley Nakoula, a shadowy convicted fraudster and user of multiple aliases; Steve Klein, an insurance salesman seemingly obsessed with the idea that West Coast America is full of jihadists poised to strike; and a mysterious charity called Media for Christ. And in their intent to provoke a reaction among the more incitable elements of Islamic countries, they were unwittingly abetted by a firm owned by Google, and a satellite channel's talk-show host.

Nakoula, although he has denied involvement, has been identified as the key figure in the making of the film, while Mr Klein has acted as its promoter, and the Christian charity was listed as the production company.

It all started, as these things so often do, with the innocuous: a casting call for a film with the working title of Desert Warrior and described as a low-budget "historical Arabian Desert adventure". Actors, including "various Middle Eastern types, bearded", were asked to apply. The lead character was to be "George – warrior leader, romantic charismatic". Actors were hired, a professional crew engaged, and most of it was shot in about two weeks last summer inside a squat warehouse that serves as the offices of Media for Christ, according to Eric Moers, who served as chief electrician for the production.

Mr Moers said the film took 15 to 16 days to shoot and that 90 per cent of the work was done at the Media for Christ studios. He said one day was spent at a movie ranch in Santa Clarita, and one day was spent filming at the home of the man he knew as Bacile, a likely alias of Nakoula. Mr Moers, who estimated the cost of production at $100,000, added: "I'd say this was the most unprofessional professional film I've worked on." He said he was paid with a cheque issued on the account of Abanob Basseley Nakoula, the 20-year-old son of the purported filmmaker.

Most of the film was shot using a backdrop to simulate other locations. The crew members received sheets with the scenes each day − never a full script − and Mr Moers said there was no mention of the word "Muhammad" throughout filming. But, at some stage, unknown to the actors (who have issued a statement saying they were misled by the film's makers), the movie was re-dubbed. "George" became Muhammad, and the dialogue was altered to insult the Islamic faith, portraying the Prophet as a bloodthirsty womaniser, and paedophile. The result, judging by the 14-minute clips available, was that a film toe-curlingly amateurish in its script, with wooden performances and shoddy production values ("sets" were often poor back-projections), became a crude and flagrant insult to Islam.

The intention of those involved may perhaps best be judged by what happened next. With the alterations complete, and the title changed to Innocence of Bin Laden, the small Vine Theatre, Hollywood, was booked for a screening, and mosques leafleted in an attempt to drum up a Muslim audience. They failed. Barely anyone at all attended the screening, and so on 2 July the film – or rather 14-minute clips of it –turned up on YouTube, with its title now Innocence of Muslims. The account used to post the footage was in the name of "Sam Bacile".

Still no notice of it was taken, so on 6 September, a Morris Sadek, an Egyptian-American Coptic Christian living in Washington and described as an anti-Islamic activist, acted. He posted a blog and emails to journalists worldwide which mentioned an "International Judge Mohammad [sic] Day" being organised on 11 September by the Rev Terry Jones, the Florida pastor who famously put the Koran on trial and then threatened to burn it. He included a link to the YouTube trailer for the Innocence film, which by now had dialogue translated into Egyptian Arabic.

This, after a couple of days, finally lit the blue touchpaper. Last Saturday, Sheikh Khalid Abdallah, who hosted a talk-show on the al-Nas satellite television channel, based in Egypt, ran an item on the film. Three days later, the deadly protests began.

With the film now beginning to inflame crowds across the Muslim world, the hunt for those responsible was initially handicapped by a fog of disinformation. Reports hit the wires that Israeli-Americans were behind the film, in particular a man called Sam Bacile, who told the Associated Press that the film was financed by "100 Jewish donors". This obvious attempt to pour fuel on the already growing flames lasted but a day or so. No Israeli involvement ever existed, and Sam Bacile was duly linked to Nakoula, a man whose middle name was Basseley and whose previous aliases included Nicola Bacily, Robert Bacily, Sam Bassiel, Erwin Salameh, plus others such as Kritbag Difrat and P J Tobacco. The YouTube account, "Sam Bacile," was used to post comments online as recently as Tuesday, including a defence of the film written in Arabic: "It is a 100 per cent American movie, you cows."

Nakoula – who denies posing as Bacile – pleaded guilty to bank fraud in 2010 and was ordered to pay more than $790,000 in restitution. He was sentenced to 21 months in prison, to be followed by five years on supervised probation, the terms of which involved not using computers or the internet without approval from his probation officer. He was accused of fraudulently opening bank and credit card accounts using social-security numbers that did not match the names on the applications, a criminal complaint showed.

He was released in June 2011, and at least some production on the video was done later that summer. As well as the fraud conviction, Nakoula also pleaded guilty in 1997 to possession with intent to manufacture methamphetamine, and was sentenced to a year in jail.

As the protests mounted, a Steve Klein came on the scene as a promoter of the film, saying that about 15 key players from the Middle East – from Syria, Iraq, Turkey, Pakistan, Iran, and a couple of Coptic Christians from Egypt – worked on the movie. The Southern Poverty Law Center, which monitors hate groups, said Mr Klein is a former marine and religious-right activist who has helped train paramilitary militias at a California church. It said he was founder of Courageous Christians United, which conducts protests outside abortion clinics, Mormon temples and mosques. He was also quoted as saying he believes that California is riddled with Muslim Brotherhood sleeper cells "who are awaiting the trigger date and will begin randomly killing as many of us as they can".

Mr Klein, whose son Matthew was seriously wounded in Iraq in 2007, said "Bacile" contacted him months ago for help in vetting the movie's script, and asked him if he would act as a spokesman if the film "caught on". While Mr Klein has granted a steady stream of interviews, and Nakoula volunteered for questioning by probation officials, Media for Christ, and its president Joseph N Abdelmasih, has not spoken publicly. Mr Abdelmasih, a Christian originally from Egypt, has spoken out against radical Islam. He also participated in a protest against a proposal to build a mosque and Islamic cultural centre near the World Trade Center site.

Events since Tuesday have underlined two aspects of the Arab Spring. First is the role of the Middle East's more freewheeling media, loosened from restrictions after the fall of long-time dictators. Before Egypt's 2011 revolution, authorities periodically suspended privately owned religious satellite channels such as al-Nas. Not any more. Second is the weakness of the forces of law and order in many former repressed states. And then there is the internet.

On Friday, Steve Klein said that he warned the filmmaker "you're going to be the next Theo van Gogh", the Dutchman killed by a Muslim extremist in 2004 after making a film that was perceived as insulting to Islam. "We went into this knowing this was probably going to happen," he said.

That, in view of the deaths and injuries still going on, is one of the most depressing aspects of the saga. Another is that all it takes for a few extremists to provoke violence is a YouTube account and access to an Arabic translator – and the certain knowledge that there are in many countries elements ready to be incited. There is nothing to stop future anti-Muslim fanatics making this happen again and again and again.