The US state department has ordered non-essential staff from its embassies in Sudan and Tunisia to leave with their families and warned its citizens against travelling to the two countries owing to concerns over rising anti-American violence.

"Given the security situation in Tunis and Khartoum, the state department has ordered the departure of all family members and non-emergency personnel from both posts, and issued parallel travel warnings to American citizens," said a spokeswoman, Victoria Nuland.

In Tunisia, the warning advised Americans that the international airport in Tunis was open and encouraged all US citizens to depart on commercial flights.

It said Americans who chose to remain in Tunisia should use extreme caution and avoid demonstrations. On Friday, protesters climbed the walls into the US embassy in Tunis, torching cars, attacking the entrance building and setting fire to a gym and a neighbouring American school.

In Sudan, the warning said that while the Sudanese government had taken steps to limit the activities of terrorist groups, some remain and have threatened to attack western interests.

The terrorist threat level remains "critical" throughout Sudan, the department said. It noted that US officials were already required to travel in armoured vehicles and to get permission to travel outside Khartoum, where crowds set alight part of the German embassy and tried to storm the US embassy on Friday.

A US official said on Saturday that Sudan's government was holding up the deployment of an elite marine team it planned to send to Khartoum to boost security at the embassy.

Meanwhile, the US secretary of state, Hillary Clinton, spoke to leading officials from seven countries on Saturday to discuss the situation following a wave of protests and violence over an anti-Muslim film that has swept across the Middle East and elsewhere in recent days. An obscure, amateurish movie called Innocence of Muslims, which depicts the prophet Muhammad as a fraud, a womaniser and a paedophile, sparked the outrage.

On Tuesday, protesters in Egypt breached the walls of the US embassy in Cairo, then well-armed extremists attacked the US consulate in Benghazi, Libya, killing four Americans, including the US ambassador to Libya, Chris Stevens. Since then, protests over the video have spread to more than 20 countries in the Middle East, Africa and south-east Asia. While most demonstrations were peaceful, marches in several places turned violent, including in Tunisia and Sudan.

Clinton spoke to the prime minister of Libya, the president of Somalia, and the foreign ministers of Britain, Egypt, France, Saudi Arabia and Turkey on Saturday, Nuland said.

She spoke to the Libyan prime minister, Mustafa Abushagur, about the importance of bringing the consulate attackers to justice, Nuland said. The prime minister "expressed confidence that the attackers would be brought to justice, noting that the government was already starting to take action", she added.

Clinton thanked the Egyptians, Turks and Saudis for their condemnations of the violence and spoke of the need to ensure security at diplomatic missions, Nuland said. Clinton and the Egyptian foreign minister, Mohamed Kamel Amr, also "agreed that while the film may be offensive and reprehensible, it cannot be used as justification for violence", she said.

The state department travel warnings came as President Barack Obama paid tribute to the Americans killed in Benghazi in his weekly radio address and denounced the anti-US protests that have followed.