The Islamic Republic of Afghanistan has officially banned the video-sharing website YouTube on Wednesday in an attempt to prevent Afghans from watching "Innocence of Muslims."

"We have been told to shut down YouTube to the Afghan public until the video is taken down," Aimal Marjan, general director of Information Technology at the ministry, told Reuters.

The film, now known as the "Mohammad film," has reportedly instigated planned protests outside the U.S. Consulate in Benghazi, Libya.

On Tuesday night, hours after violent protestors had climbed the walls of the consulate and vandalized the exterior of the facility, a suicide bombing went off and took the lives of four American diplomats who were inside.

While many believe that film sparked the powerful protests, CNN reports that the deadly assault on the U.S. Consulate was planned by the attackers who used the protests as a diversion.

According to CNN, the sources could not say whether the attackers instigated the protest or merely took advantage of it.

The consulate was one of several American diplomatic missions in the Middle East to fall victim to protests Tuesday after the release online of the film mocking Islam and depicting the Muslim prophet Mohammed as a child molester, womanizer and ruthless killer.

CNN cites a U.S. official familiar with the attack who reportedly told the news outlet that a grenade set the building ablaze, leaving the Americans facing both a fire inside and attackers outside.

U.S. Ambassador Christopher Stevens and the others who died were separated from the rest of the staff while trying to escape to the roof of the building and succumbed to smoke inhalation, the senior official told CNN.

The official added that there were several "valiant but unsuccessful" attempts to get back into the building and rescue them.

U.S. officials announced on Wednesday that around 50 U.S. Marines from a rapid reaction force were headed to Libya in an effort to restore security to the Consolate.

In Washington, President Barack Obama said the violence was completely unwarranted and vowed that "justice will be done."

"Since our founding, the United States has been a nation that respects all faiths. We reject all efforts to denigrate the religious beliefs of others," he said. "But there is absolutely no justification for this type of senseless violence -- none."