Updated

YouTube has blocked a video attacking Islam's prophet Muhammad in Egypt, where angry protests were sparked by outrage at the video.

Ultraconservative Muslims enflamed by the video stormed the U.S. embassy in Cairo on Tuesday and replaced an American flag with an Islamic banner. Later Tuesday evening, protesters in Libya burned down the U.S. consulate in the Libyan city of Benghazi, killing the U.S. ambassador to Libya and three members of his staff.

YouTube has continued to leave the video on its site, but has blocked access to it in Egypt. The Google-Inc.-owned video site did not immediately comment Wednesday.

The 14-minute video is a trailer to an amateurish, low-budget movie titled "Innocence of Muslims," which depicts Muhammad as a feckless philanderer who approved of child sexual abuse.

Earlier Wednesday, an Afghan official said the government had temporarily blocked access to YouTube to prevent people from watching a film that ridicules Islam's Prophet Muhammad.

Aimal Marjan, general director of information technology at the Ministry of Communications, says the site was blocked for about 90 minutes Wednesday until YouTube took the video down.

He says access to the site was then restored. Marjan says the government decided to temporarily deny access to YouTube because of concerns the video could spark protests.

The decision came after President Hamid Karzai condemned the film he described as "inhuman and insulting."

Earlier this year, Afghans rioted after U.S. soldiers serving at Bagram prison north of Kabul mistakenly burned hundreds of Korans and other religious materials that had been taken from the facility' library.