BEIRUT, Lebanon — Pro-government demonstrators attacked the American and French embassy compounds in Damascus, Syria, on Monday, angered over visits by the ambassadors to a central Syrian city that has emerged as a flashpoint of the popular uprising against the government.

The demonstrators threw rocks, eggs and tomatoes at the two buildings and tried to storm both compounds. But American Marine guards blocked their way at the United States Embassy, and French guards fired live ammunition into the air to drive the attackers away, according to witnesses. Several injuries were reported, but no deaths.

An eyewitness in Afif, the old quarter of the capital where the American Embassy is located, said that demonstrators tore down embassy plaques and tried to break security glass. The witness, who declined to be identified because of the delicacy of the situation, said the protesters traveled to the embassy in four buses, and that some of them were armed.

French officials said that three embassy guards were injured when “well-organized groups” attacked the French compound using a battering ram. An eyewitness said that French guards briefly detained one of the protesters.