* Embassy unstaffed during attack - security officer
* Protesters also torch nearby American School, which was also closed
* Government, relying on U.S. help to guarantee loans, condemns attacks
By Tarek Amara
TUNIS, Sept 14 (Reuters) - At least two people were killed and 29 others were wounded on Friday when police fought hundreds of protesters who ransacked the U.S. embassy in Tunisia in their fury over a film denigrating the Prophet Mohammad, state television said.
Tunisian President Moncef Marzouki condemned what he called "an attack against the embassy of a friendly nation".
Tunisia expects Washington to guarantee around a fifth of the $2.2-2.5 billion its needs to borrow next year to help its economy recover after its revolution last year overthew its veteran leader and triggered the Arab Spring uprisings.
A Reuters reporter saw police open fire to try to quell the assault, in which protesters forced their way past riot police into the embassy.
The protesters smashed windows, hurled petrol bombs and stones at police from inside, and started fires in the embassy and the compound. A black plume of smoke rose from the building.
One protester was seen throwing a computer out of a window, while others walked away with telephones and computers.
A Tunisian security officer near the compound said the embassy had not been staffed on Friday, and calls to the embassy went unanswered. A Reuters reporter saw two armed U.S. soldiers on the roof.
Health Minister Khalil Zaouia told state media at least two people died and 29 were injured, revising down an earlier toll from state television which said three died and 28 had been wounded.
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 began after Friday prayers and followed a rallying call on Facebook by Islamist activists that was quickly endorsed by the local faction of the Islamic militant group Ansar al-Sharia.
An Interior Ministry spokesman said police were hunting Saif-Allah Benahssine, the leader of the Tunisian branch of Ansar al-Sharia to interrogate him about the incidents. Better known under the alias Abu Iyadh, Benahssine is also a prominent figure in Tunisia's Salafist movement.
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 against the crude, low-budget film, made in California and trailed online, which portrayed the Prophet engaged in vulgar and offensive behaviour.
"The (Tunisian) government does not accept these acts of aggression against foreign diplomatic missions," said a statement read on state television. It said Tunisian authorities were "committed to ensuring the safety of foreign diplomatic missions".
Hundreds of protesters wielding petrol bombs, stones and sticks had charged at the security forces protecting the embassy before jumping a wall to invade the compound.
"Obama, Obama, we are all Osamas," they 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.
Riot police finally drove the protesters from the embassy and the compound, and a Reuters reporter saw them arresting around 60.
The compound was cordoned off by police, soldiers and members of the elite presidential guard, but clashes continued in the el-Aouina district across a highway from the smart Auberge du Lac neighbourhood where the embassy is located.
Marzouki, in an address broadcast on state media, said he had spoke to U.S. Secretary of State Hillary Clinton and condemned the attack as "unacceptable considering its implications on our relations with" Washington.
"This attack is part of a wider plan aimed at stoking hatred between the people," he said.