(Adds details and background)

By Tarek Amara

TUNIS, Sept 14 (Reuters) - At least 20 people were wounded when police opened fire on Friday to try to quell an assault on the U.S. embassy in Tunis by hundreds of protesters incensed by a U.S.-made film insulting the Prophet Mohammad.

A Reuters reporter also saw the protesters force their way into the embassy compound. One was seen throwing a computer out of a window. Others smashed windows or set fire to trees in the compound. A black plume of smoke rose from the building.

The protesters, many of whom were Islamic Salafists, also set fire to the nearby American School, which was closed at the time, and took away laptops and tablet computers.

The protests, which began after Friday prayers, followed a call on Facebook by Islamist activists that was quickly endorsed by the local faction of the Islamic militant group Ansar al-Sharia.

Libyan officials suspect the Libyan branch of Ansar al-Sharia of being behind an attack in Benghazi in which four Americans, including the U.S. ambassador to Libya, were killed on Tuesday.

The moderate Islamist Ennahda movement, which heads the Tunis government, had advised Tunisians against participating in the protest.

Hundreds of protesters armed with petrol bombs, stones and sticks charged on the security forces protecting the U.S. embassy, forcing many riot police to retreat, before jumping a wall to invade the compound.

Police fought back by chasing and firing at the protesters, although it was not immediately clear if live ammunition or rubber bullets were used.

"Obama, Obama, we are all Osamas," the protesters chanted, in reference to the slain al Qaeda leader Osama bin Laden.

The protesters pulled down the U.S. flag flying over the embassy, burned it, and replaced it with a black flag emblazoned with the Shahada, the Islamic declaration of faith.

(Reporting By Tarek Amara; Writing by Souhail Karam; Editing by Kevin Liffey)

((souhail.karam@thomsonreuters.com))

Keywords: FILM PROTESTS/TUNISIA SCHOOL