(Reuters) - An American staff member of the U.S. Consulate in the eastern Libyan city of Benghazi has died following fierce clashes at the compound, Libyan security sources said early Wednesday.

"One American staff member has died and a number have been injured in the clashes," Abdel-Monem Al-Hurr, spokesman for Libya's Supreme Security Committee, said, adding that he did not know the exact number of wounded and could not say what the cause of death was.

Armed gunmen attacked the compound on Tuesday evening, clashing with Libyan security forces before the latter withdrew as they came under heavy fire. The armed group is said to have been protesting a film being produced in the United States.

The incident followed a protest in neighboring Egypt where demonstrators scaled the walls of the U.S. Embassy, tore down the American flag and burned it during a protest over what they said was a film that insulted Prophet Mohammad.

Reuters reporters on the scene could see looters raiding the empty Benghazi compound, walking off with desks, chairs and washing machines.

Unknown gunmen were shooting at the buildings while others threw handmade bombs into the compound, setting off small explosions. Small fires were burning around the compound.

Passersby entered the unsecured compound to take pictures with their mobile phones and watch the looting.

No security forces could be seen around the consulate and a previous blockade of the road leading to it had been dismantled.

"The Libyan security forces came under heavy fire and we were not prepared the intensity of the attack," Hurr said.

Libya's interim government has struggled to impose its authority on a myriad of armed groups which have refused to lay down their weapons and often take the law into their own hands.

A number of security violations have rocked Benghazi, Libya's second biggest city and the cradle of last year's revolt that toppled Muammar Gaddafi.

(Reporting by Omar al-Mosmari in Benghazi and Hadeel Al-Shalchi and Ali Shuaib in Tripoli; Writing by Marie-Louise Gumuchian; Editing by Michael Roddy)