Gunmen attacked U.S. consulate offices in Libya's eastern city of Benghazi on Tuesday, and fought with security forces in protest against a U.S. film they say is blasphemous, a security official said.
He said a fire was burning inside the consulate and that staff had been evacuated.
A Reuters reporter saw three injured members of the Libyan security forces taken away in an ambulance. A Libyan security official who declined to be named said one U.S. security guard was injured in the clashes.
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.
"There are fierce clashes between the Libyan army and an armed militia outside the U.S. consulate," said Abdel-Monen Al-Hurr, spokesman for Libya's Supreme Security Committee.
"The American security guards inside the building fired at the militia as they were trying to enter and attack it."
He said roads had been closed off and security forces were surrounding the building. He said the clashes were outside the consulate building.
"There is a connection between this attack and the protests that have been happening in Cairo," Hurr said.
"They are trying to take advantage of the security situation in Libya and cause more instability in the country."
Although it was not clear which film prompted the protests, Egypt's prestigious Al-Azhar mosque and seat of Sunni learning on Tuesday condemned a symbolic "trial" of the Prophet organized by a U.S. group including Terry Jones, a Christian pastor who triggered riots in Afghanistan in 2010 by threatening to burn the Koran.
According to the website www.standupamericanow.org, Jones and others were due to take part in an event on Tuesday - the anniversary of the September 11 attacks by al Qaeda on U.S. cities - called "International Judge Mohammad Day" in Florida. It was due to be carried live on the Internet.
Some activists had mentioned Jones in calls for a protest.
In Benghazi, Reuters reporters at the scene said they could hear shooting and had heard an explosion from inside the closed-off area. Rising smoke could also be seen.
A U.S. embassy source said there had been "an attack" on the diplomatic office in Benghazi, but gave no further details.
Benghazi, the cradle of last year's uprising that toppled Muammar Gaddafi, has been hit by several bombings and attacks on international convoys as well as some Western missions.
In June, an explosive device was dropped from a passing car outside the offices of the U.S. diplomatic mission. The blast that followed slightly damaged the gate in front of the building. A week later, a British embassy convoy was attacked about 300 meters (328 yards) from the British consulate office in the city.
(Reporting by Ahmed al-Rubaie in Benghazi; Ali Shuaib, Hadeel Al-Shalchi and Marie-Louise Gumuchian in Tripoli; Editing by Louise Ireland)