CAIRO, Egypt — The perception of the western and Muslim worlds locked in a war of values has been heightened following a series of attacks on US missions in Egypt and Libya.

A low-budget film depicting the Muslim Prophet Muhammad as a manipulative, war-mongering playboy — and reportedly promoted by fringe US pastor Terry Jones — was only recently dubbed into Arabic and posted on YouTube, sparking outrage among Muslims in Egypt and Libya.

In Cairo, thousands of protesters marched outside the US embassy on Tuesday, where they breached the citadel-like consulate walls. In Benghazi, Libya, gunmen stormed the consulate, setting the building alight and killing four staff, including US ambassador Chris Stevens, who was a staunch supporter of Libya’s revolution against dictator Muammar Gaddafi last year. US officials now suspect the attack on the ambassador might have been planned in advance.

The fanaticism was both born of, and fed into, the polarizing narratives of each side. Americans hate Islam, otherwise such a film would never have been made, some here say. In the US, the violent actions of a handful of Libyans and Egyptians vindicate those on the right who say Muslims are a destructive group, bent on destroying America and its institutions.

The reality is much more complex.

More from GlobalPost: Full coverage of the embassy attacks

Terry Jones, made infamous last year when he burned a Quran, prompting deadly protests in Afghanistan, is a fringe pastor who heads a church of roughly 50 core followers in the state of Florida, in a country of more than 300 million people.

In Libya, locals fought — and were killed — defending the US consulate there, and Libyans on Twitter expressed an outpouring of apologies and grief for the deadly attack.

“This was an attack by a small and savage group,” US Secretary of State Hillary Clinton said in a speech from the White House on Wednesday. “Not by the people or the government of Libya.”

Many Egyptians similarly were upset over the storming of the US embassy in Cairo.

“I think this gives a bad image of Muslims in western countries. It is not our religion,” said Al Hussien Adham, a 23-year-old Egyptian medical student. “We are better than that. We were taught to treat others as we would treat ourselves.”

Indeed, many Egyptians were stunned by, and condemned, the death of the US ambassador in Libya — an action they said they would work hard to ensure never happened in Egypt.

On Wednesday, protests in Cairo had already died down, with only a handful still milling around the US embassy, which is located in an upscale district of the city just blocks from the iconic Tahrir Square.

“Egyptians are emotional when it comes to their prophet and religion,” said 24-year-old engineer and Cairo resident, Amro Hussein. “We condemn the film, but what happened in Libya — we are totally against what happened there.”

More from GlobalPost: The men behind the controversial film

While the so-called Arab Spring, a series of Middle East uprisings that began in Tunisia in 2010, was born of the want for political, civil and even religious freedoms, it also midwifed in some countries an Islamic-nationalist identity.

In Egypt, candidates belonging to the Muslim Brotherhood and, to a lesser extent, fundamentalist Salafi groups, triumphed in recent parliamentary and presidential elections.

According to a poll released by the Pew Research Center in May, 66 percent of Egyptians see Islam as playing a major role in the political life of the country.

This trend can make it politically difficult for Egypt’s leaders to speak out more forcefully against the actions of the extremists, lest the statements are misconstrued as being unsupportive of Islam.

“Today, there is a lot more room for Islamic political forces to organize,” said Ziad Akl, senior researcher at the Cairo-based Al Ahram Center for Political and Strategic Studies.

“And what happened [yesterday] is the result of a mix between a traditional cultural orientation to being very touchy with matters regarding the prophet, the political opportunity of Islamists, and radicalization and mobilization of Islamists under the auspices of protecting the image and legacy of the prophet,” he said.

More from GlobalPost: Libya attack becomes US campaign issue

This is not the case in Libya, where Islamists lost at the polls in July — and Libya’s current secular government condemned the attack and apologized to the US on live television. Middle East observers say Libya is battling a post-revolution security vacuum that likely led to the attack, where armed groups that fought Gaddafi’s forces are largely left alone due to their prominent role in the uprising.

Egyptian President Mohamed Morsi, a longtime leader of the Muslim Brotherhood, first “condemned the transgression upon the prophet” before emphasizing that the Egyptian state is responsible for the protection of foreign embassies, according to a statement posted on the president’s official Facebook site.

The Muslim Brotherhood also called for mass demonstrations on Friday, a traditional day of protest, to express anger over the film’s disrespect for the prophet.

Morsi’s position is further complicated by his efforts to seek a $4 billion loan from the International Monetary Fund to resuscitate Egypt’s ailing economy. To secure those funds, Morsi needs US political and financial support.

But Morsi also doesn’t want to anger his Islamist base by condemning those who insist they are protesting in the prophet’s name, especially with fresh legislative polls looming on the horizon.

In addition, just 19 percent of Egyptians hold a favorable view of the United States, according to the same Pew survey released in May.

“Egypt is different. Here, Morsi belongs to the Islamic stream. He will never state that the problem is not with the movie, and that the prophet was not violent. He cannot condemn the action,” Akl said. “The Muslim Brotherhood is very much aware of the fact that this will create a division within the Islamic camp, that people will see the Brotherhood as un-Islamic.”

The result will be the marginalization of the mainstream moderates — the millions who did not protest and do not want to see further violence in the name of the prophet — and the empowerment of a groundswell of Islamist and, in some cases, anti-American sentiment.

“I blame the Obama administration for this,” Hussein said.

“He promoted [the Islamists] as moderates, and as calling for reform. But imagine if they had weapons. It would have been like Iran,” he said, referring to when pro-Islamic demonstrators stormed the US embassy in Tehran in 1979 and took dozens of Americans hostage.

Decoded: 3 questions with Middle East editor Peter Gelling: