Protesters destroy an American flag pulled down from the United States embassy in Cairo, Egypt, on Tuesday.

Cairo - Main ultraconservative Islamist protesters climbed the walls of the United States embassy in Egypt's capital on Tuesday and brought down the American flag, replacing it with a black flag with an Islamic inscription to protest against a video attacking Islam's prophet, Mohammad.

Hundreds of protesters marched to the embassy in downtown Cairo, gathering outside its walls and chanting against the movie, which was reportedly produced in the United States.

“Say it, don't fear: Their ambassador must leave,” the crowd chanted.

Dozens of protesters then scaled the embassy walls, went into the courtyard and took down the flag from a pole. They brought it back to the crowd outside, which tried to burn it, but failing that, tore it apart. The protesters on the wall then raised on the flagpole a black flag with the Muslim declaration of faith on it, “There is no god but God and Mohammad is his prophet.”

The flag, similar to the banner used by al-Qaeda, is commonly used by ultraconservatives around the region. Almost all the embassy staff had left the compound before the protest, and the ambassador was out of town.

The protest was sparked by outrage over a video being promoted by an extreme anti-Muslim Egyptian Christian campaigner in the US, clips of which are available on the social website YouTube and dubbed in Egyptian Arabic. The video depicts Mohammad as a fraud, showing him having sex and calling for massacres. Muslims find it offensive to depict Mohammad in any fashion, much less in an insulting way.

By evening, the protest grew with thousands standing outside the embassy, chanting “Islamic, Islamic... The right of our prophet will not die.” A group of women in black veils and robes that left only their eyes exposed chanted: “Worshippers of the cross, leave the Prophet Mohammad alone.”

Dozens of riot police lined up along the embassy walls. They did not stop protesters who continued to climb up the wall and stand on it, chanting. But it appeared they were no longer going into the embassy compound.

One young member of the ultraconservative Salafi movement, Abdel-Hamid Ibrahim said: “This is a very simple reaction to harming our prophet.”

In Washington, State Department spokesperson Victoria Nuland said the US was working with Egyptian authorities to try to restore order.

Only a few staff members were still inside, as embassy security had sent most staff home early after learning of the upcoming protest, a US official said, speaking on condition of anonymity because he wasn't authorised to speak publicly on the matter.

It was not exactly clear who made the video that angered the protesters.

Morris Sadek, an Egyptian-born Christian in the US known for his anti-Islam views, told The Associated Press from Washington that he was promoting the video on his website and on certain TV stations, which he did not identify.

For several days, Egyptian media have been reporting on the video, playing some excerpts from it and blaming Sadek for it, with ultraconservative clerics going on air to denounce it. - Sapa-AP