The mobs involved in both embassy attacks were mainly comprised of Salafis, followers of an ultra-traditionalist approach to Islam that has spread across North Africa as well as much of the rest of the Arab world from Saudi Arabia in recent years.
Although they were not the prime movers in the "Arab Spring" protests, they have become much more visible in countries like Libya where secular dictators have been overthrown.
They are incensed by a film made in America and promoted on Youtube entitled "The Innocence of Muslims" that is intended to expose the "hypocrisy" of Islam. It not only portrays the Prophet, which the religion prohibits, but ridicules him as a homosexual and advocate of paedophilia, and shows him having sex.
It was apparently made by an Israeli-American businessman and backed by Terry Jones, the fundamentalist pastor who previously threatened to hold public burnings of the Koran. A version of the film, which is in English, has been dubbed into Egyptian Arabic and shown on the website of an Egyptian Coptic Christian businessman based in America