Updated

Several hundred lawyers protesting an anti-Islam video forced their way into an area in Pakistan's capital that houses the U.S. Embassy and other foreign missions on Wednesday, and the United States temporarily closed its consulate in an Indonesian city because of similar demonstrations.

The lawyers who protested in Islamabad shouted anti-U.S. slogans and burned an American flag after they pushed through a gate, gaining access to the diplomatic enclave before police stopped them. They called for the U.S. ambassador to be expelled from the country, and then peacefully dispersed.

The demonstration followed three days of violent protests against the film in Pakistan in which two people were killed. At least 28 other people have died in violence linked to the film in seven countries, including U.S. Ambassador Christopher Stevens and three other Americans killed in a Sept. 11 attack on the U.S. Consulate in Benghazi, Libya.

Much of the anger over the film, which denigrates Islam's Prophet Muhammad, has been directed at the U.S. government even though the film was privately produced in the United States and American officials have criticized it.

The U.S. Embassy in Indonesia sent a text message to U.S. citizens saying that the consulate in Medan, the country's third-largest city, has been closed temporarily because of demonstrations over the film, "Innocence of Muslims."

About 300 members of Hizbut Tahrir Indonesia, a pan-Islamic movement, rallied peacefully on Wednesday in front of the consulate in Medan, the capital of North Sumatra province. Later, about 50 Muslim students also protested there. Both groups called on Washington to punish the makers of the film.

It was the third consecutive day of protests in Medan. On Monday, protesters hurled rocks and Molotov cocktails outside the embassy in Jakarta, the capital.

In France, the government has barred a planned protest by people angry over the anti-Islam film, but defended a newspaper's right to publish caricatures of the prophet.

France's foreign minister said security is being stepped up at some French embassies amid tensions in France and elsewhere around the film. French authorities and Muslim leaders urged calm in the country, which has the largest Muslim population in western Europe.

Riot police took up positions outside the Paris offices of a satirical French weekly that published crude caricatures of the Prophet Muhammad on Wednesday that ridicule the film and the furor surrounding it. The provocative weekly, Charlie Hebdo, was firebombed last year after it released a special edition that portrayed the Prophet Muhammad as a "guest editor" and took aim at radical Islam.

The investigation into that attack is still under way.

Prime Minister Jean-Marc Ayrault of France said organizers of a planned demonstration Saturday against the film won't receive police authorization. Ayrault told French radio RTL that "there's no reason for us to let a conflict that doesn't concern France come into our country. We are a republic that has no intention of being intimidated by anyone."

On Tuesday, Islamic militants sought to capitalize on anger over the film, saying a suicide bombing that killed 12 people in Afghanistan was revenge for the video and calling for attacks on U.S. diplomats and facilities in North Africa.