TUNIS, Tunisia—Violent protests outside the U.S. embassy in Tunis were met with tear gas and gunshots Friday, leaving two people dead, 29 others injured and waves of black smoke wafting over the city.

Several dozen protesters briefly stormed the U.S. Embassy compound in Tunisia’s capital, setting fire to cars and raising a flag with the Muslim profession of faith on it as part of the protests against an anti-Muslim film.

Earlier, several thousand demonstrators had gathered outside the U.S. embassy, including stone-throwing protesters who clashed with police, according to an Associated Press reporter on the scene. Police responded with gunshots and tear gas.

The state news agency TAP, citing the health ministry, said both of those killed were demonstrators, while the injured included both protesters and police.

A Tunisian employee of the U.S. embassy who had an injured leg was taken out on a stretcher to an ambulance. It wasn’t immediately clear if there were any other injuries. Embassy spokespeople did not respond to calls and emails.

Protesters also set fire to an American school adjacent to the embassy compound and prevented firefighters from approaching it. Thick columns of black smoke wafted through the neighborhood.

The group that breached the U.S. embassy’s outer wall was eventually pushed back outside by police and special forces. As night fell, the crowd of protesters outside the embassy dwindled to a handful.

Crowds angry over an anti-Muslim film ridiculing the Prophet Muhammad have assaulted U.S. embassies across the Middle East.