It appears that terrorists linked to al-Qaeda or other similar groups specifically targeted the United States as it was the anniversary of 9/11. The protests surrounding the movie were merely a ruse. According to CNN:
Tuesday’s attack on the U.S. Consulate in Benghazi, Libya, was planned in advance, and the attackers used the protest outside the consulate as a diversion, U.S. sources told CNN Wednesday.
The sources could not say whether the attackers instigated the protest or merely took advantage of it. The sources do not believe Ambassador Chris Stevens was specifically targeted.
A grenade attack created a fire in the U.S. consulate building in Benghazi, which created a very complicated and complex situation for those inside, according to a senior U.S. official familiar with the details of what happened.
“Folks inside were fighting the fire inside and the attackers outside. It was a cascading casualty, and Amb. Chris Stevens and the others got separated trying to escape to the roof of the building, ultimately succumbing to smoke inhalation,” the U.S. official told CNN’s Jill Dougherty. “There will be more details as we go forward, but there were several valiant attempts to re-enter the burning building to find and save the ones we lost. Valiant but unsuccessful.”
Another senior official with the State Department confirmed the details as well.