European countries urged their nationals to leave the eastern Libyan city of Benghazi on Thursday, with Britain citing a "specific and imminent" threat to Westerners days after a deadly attack by Islamist militants in neighbouring Algeria.
Officials declined to give details, but Britain has warned of a growing militant threat in North Africa, which Prime Minister David Cameron has called a "magnet for jihadists".
The call to leave Libya's second largest city irked Libyans keen to win foreign investment to rebuild a fractured infrastructure and boost the oil industry after the revolution which toppled Muammar Gaddafi in 2011.
"We are now aware of a specific and imminent threat to Westerners in Benghazi, and urge any British nationals who remain there against our advice to leave immediately," the Foreign Office said in a statement.
Similar warnings came from Germany and the Netherlands.
They followed the deaths of at least 38 hostages in an attack on Algeria's In Amenas gas complex near the Libyan border, and the start of French military operations in Mali.
German Foreign Minister Guido Westerwelle described the situation in Benghazi, cradle of the uprising against Gaddafi, as "serious and delicate".
"The warning was made because of a series of bits of information. We have our reasons, but I would not like to speak of details. Security is the most important thing," he told reporters during a visit to Lisbon.
Few Westerners are believed to be in Benghazi, which has experienced a wave of violence against diplomats as well as military and police officers, including an attack in September that killed the US ambassador and three other Americans.
A British embassy spokeswoman in Tripoli said the number of Britons in Benghazi was small, without specifying further.
US and European sources downplayed the risk to Americans, saying the threats were explicitly directed against European nationals.
Libyan deputy Interior Minister Omar al-Khadrawi said there were no more than 20 British nationals in Benghazi and most worked at international schools.
The principal of the British School Benghazi said he was told to close the school after a personal call from the British ambassador in Tripoli.
"He called each of the British nationals