Most outrage appears linked to the amateurish movie, which portrays the prophet as a fraud, womanizer and child molester.
The television ads in Pakistan feature clips of President Barack Obama and Secretary of State Hillary Rodham Clinton during press appearances in Washington in which they condemned the video. Their words were subtitled in Urdu.
"We absolutely reject its content and message," said Clinton in the advertisement.
The advertisements end with the seal of the American Embassy in Islamabad, the Pakistani capital.
State Department spokeswoman Victoria Nuland said the ad was produced by the embassy, which spent $70,000 to air the 30-second spot on seven Pakistani television stations. Pakistan is the only country where the ads are running. The embassy wanted to run the ads because it determined that the messages of Obama and Clinton were not reaching enough of the Pakistani public through regular news reporting, Nuland said.
"As you know, after the (anti-Islam) video came out, there was concern in lots of bodies politic, including Pakistan, as to whether this represented the views of the U.S. government. So, in order to be sure that we reached the largest number of Pakistanis, some 90 million as I understand it in this case with these spots, it was the judgment that this was the best way to do it," Nuland said.
In an email, the embassy in Islamabad sent out a link to video of ordinary Americans condemning the anti-Islam film, which appeared on YouTube. The State Department compiled the clips to give foreign audiences an idea of what regular Americans and their religious leaders thought of the video, Nuland said.
Protests have tapered off in many countries, but in Pakistan on Thursday, more than 2,000 people tried to reach the U.S. Embassy inside a guarded enclave that houses embassies and government offices.
Riot police used tear gas and batons to keep the stone-throwing demonstrators away from the enclave, and hundreds of shipping containers were lined up to cordon off the area. The government later called in army troops to protect the restricted areas when it appeared that police could not handle the situation.
"It is our responsibility to protect all our diplomats, all the foreigners," said Pakistani Information Minister Qamar Zaman Kaira. He criticized protesters for resorting to violence and suggested that various religious and militant groups among the crowd were to blame.
Most of the protesters appeared to be students affiliated with the Islamist hardline Jamaat-e-Islami party. Flags from other Islamist groups, Jamaat-u-Dawa and the al-Qaida linked militant group, Sipah-e-Sahaba, could be seen flying among the crowd. Demonstrators also rallied peacefully in the Pakistani cities of Lahore, Chaman, Karachi and Peshawar.
The demonstrations are expected to grow on Friday, the traditional Muslim day of prayer. The Pakistani government deemed Friday a national holiday so people can demonstrate peacefully against the film.
That decision drew rare praise from the Pakistani Taliban, which is usually at war with the government. A spokesman for the militant group said it welcomed the decision but also thought the government should expel all American diplomats.
The U.S. State Department on Thursday warned all U.S. citizens to defer non-essential travel to Pakistan until further notice. Their previous travel warning only reminded Americans of ongoing security concerns in the country. American consulates across the country have been closed to the public all week.
In Indonesia, the U.S. consulate in the country's third-largest city of Medan was closed for a second day because of demonstrations. Fifty students from an Islamic university gathered in Makassar, the capital of South Sulawesi province in Indonesia to protest the film.
In Iran, hundreds of students and clerics gathered outside the French embassy in Tehran to protest the publication of the caricatures of the Prophet Muhammad in the French weekly. In Kabul, a few hundred people demonstrated against the film before dispersing peacefully.