NATO peacekeepers exchanged gunfire with protesters who attacked their base Tuesday in another day of deadly demonstrations in Afghanistan over the publication of caricatures of the Prophet Muhammad, officials said. Three demonstrators were killed.

In neighboring Pakistan, 5,000 people chanting "Hang the man who insulted the prophet!" burned effigies of Denmark's prime minister and a cartoonist.

Denmark Prime Minister Anders Fogh Rasmussen called the protests "a growing global crisis" and appealed for calm. The Danish paper Jyllands-Posten was the first to publish the drawings, in September.

"It now is something else than the drawings in Jyllands-Posten," he said. "Now it has become an international political matter."

A prominent Iranian newspaper said it was going to hold a competition for cartoons on the Holocaust in reaction to European newspapers recently republishing the prophet drawings. Iran's supreme leader, Ayatollah Ali Khamenei, said the Muhammad drawings were an Israeli conspiracy motivated by anger over the victory of the militant Hamas group in last month's Palestinian elections.

The European Union, in turn, warned Iran that attempts to boycott Danish goods or cancel trade contracts with European countries would lead to a further deterioration in relations. Those relations already are strained by concerns over Iran's nuclear program.

President Bush called Fogh Rasmussen to express "solidarity and support" in the wake of the violence, the White House said Tuesday. Spokesman Scott McClellan said the leaders agreed that all sides must move forward "through dialogue and tolerance, not violence."

The drawings — including one depicting the prophet wearing a turban shaped as a bomb — have touched a raw nerve partly because Islam is interpreted to forbid any illustrations of Muhammad for fear they could lead to idolatry.

The most violent demonstrations were in Afghanistan, where thousands of rioters clashed with police and NATO peacekeepers across the country.

About 250 protesters armed with assault rifles and grenades attacked the NATO base in the northwestern town of Maymana, burning an armored vehicle, a U.N. car and guard posts, said a Maymana Hospital doctor.

Some in the crowd fired light weapons and threw stones and hand grenades, and the Norwegian troops responded with tear gas, rubber bullets and warning shots, said Sverre Diesen, commander of Norwegian forces.

Three protesters were shot to death and 25 others were wounded, while some 50 others were hurt by tear gas fired by the peacekeepers, said Sayed Aslam Ziaratia, the provincial deputy police chief.

Seven NATO soldiers were hurt, Diesen told reporters in Oslo.

It was not clear who killed the protesters.

The United Nations pulled its staff out of Maymana, near Afghanistan's border with Turkmenistan, and NATO peacekeepers rushed reinforcements to the remote town. Two Norwegian aid groups began pulling international staff out of Afghanistan after Tuesday's attacks.

In the capital, Kabul, police used batons to beat stone-throwing protesters outside the Danish diplomatic mission office and near World Bank offices. Police arrest several people, many of them injured.

More than 3,000 protesters threw stones at government buildings and an Italian peacekeeping base in the western city of Herat, but no one was injured, witness Faridoon Pooyaa said.

About 5,000 people clashed with police in Pulikhumri, north of Kabul, police commander Sayed Afandi said.

Four people died and 19 were injured Monday in demonstrations.

Muslim anger has been directed at Denmark. Danish missions have been attacked and boycotts of Danish products launched in many Muslim countries.

The cartoons have been reprinted by media outlets in Europe, the United States and elsewhere — sometimes to illustrate stories about the controversy but also by some who say they were supporting free speech.

In India's portion of the disputed region of Kashmir, police fired tear gas to disperse hundreds of protesters. At least six protesters and two police were injured in the clash, a police said.

The protest by 5,000 people in the northwestern Pakistani city of Peshawar was the largest to date there against the drawings. There were no reports of violence.

Chief Minister Akram Durrani, the province's top elected official who led the rally, demanded the cartoonists "be punished like a terrorist."

"Islam ... insists that all other religions and faiths should be respected," he said. "Nobody has the right to insult Islam and hurt the feelings of Muslims."

Danish citizens were advised to leave Indonesia, where rowdy protests were held in at least four cities.

The Iranian newspaper Hamshahri invited foreign cartoonists to enter its Holocaust cartoon competition, which it said would be launched Monday. The newspaper is owned by the Tehran Municipality, which is dominated by allies of President Mahmoud Ahmadinejad, the former Tehran mayor known for his opposition to Israel.

Last year, Ahmadinejad provoked outcries when he said on separate occasions that Israel should be "wiped off the map" and the Holocaust was a "myth."

An aid group that provides food to tens of thousands of people in war-ravaged Chechnya suspended its operations after Chechen officials banned all Danish organizations.

The EU's executive office warned Iran that attempts to boycott Danish goods or cancel trade contracts with European countries would lead to a further cooling of relations.

EU spokesman Johannes Laitenberger said the bloc was trying to confirm comments reportedly made by Ahmadinejad advocating a boycott of Danish products.

"A boycott of Danish goods is by definition a boycott of European goods," Laitenberger said. "A boycott hurts the economic interests of all parties."

Ahmadinejad also ordered his commerce minister to study scrapping all trade contacts with European countries whose newspapers published the caricatures, Iranian media reported.