The Danish Foreign Ministry says it has evacuated its staff from embassies in Algeria and Afghanistan because of threats after newspapers reprinted a cartoon depicting the Prophet Muhammad.

Embassy employees have been moved to secret locations in both countries' capitals but continue to work, Foreign Ministry spokesman Erik Laursen said.

The announcement comes after Danish intelligence officials warned of an "aggravated" threat against Denmark since newspapers published in February a cartoon depicting the Prophet Muhammad.

The warning specifically singled out North Africa, the Middle East, Pakistan and Afghanistan.

Laursen said the threat is so concrete the government had to take this decision, based on intelligence.

He said the staff in Algiers was relocated some days ago and employees in Kabul were moved Wednesday.