Britons should leave the Libyan city of Benghazi immediately in response to a "credible and serious" threat to Westerners, the Foreign Office says.
The British Embassy in Tripoli has been in contact with a "small number" of British nationals whose details it had.
The Foreign Office could not comment more on the threat's nature, but said there was new travel advice for Libya.
The Foreign Office has been advising against travel to Benghazi and most parts of Libya since September.
In its updated advice, the Foreign Office said that after the recent French military intervention in Mali, there was the possibility of retaliatory attacks against Western interests in the region.
There is also the threat of kidnapping in Libya.
'Credible and serious'
A spokesman would not confirm how many Britons it had spoken to but said it was a "small number".
Foreign Office minister David Lidington told the BBC the government had received "credible, serious and specific" reports about a possible "terrorist threat".He added: "The terrorist risk in Benghazi and other parts of this region has been there for some time before Mali and the Algeria crisis of last weekend... the safety of British citizens is our top priority."
Mr Lidington did not say whether the British government would charter flights to Benghazi to evacuate British nationals.
BBC correspondent in Libya Rana Jawad said only "tens" of nationals are registered with the British Embassy.
She said Britons would most likely be using commercial flights to leave the country from Benghazi, which has seen a "series of attacks against security officials" in the past year.
Our correspondent added that Western diplomats had told the BBC the British School in Benghazi had closed on Wednesday and may be closed for the next few weeks.
On 11 September, US ambassador Chris Stevens and three other Americans died during an attack on the US consulate in Benghazi.
The ambassador died of smoke inhalation when he was trapped inside as the building burned, after armed men had attacked the compound.
Britain has not had a diplomatic presence in Benghazi - Libya's second largest city - since the attack.
Prof George Joffe, an expert in North African affairs at Cambridge University, said there had long been an extremist element in eastern Libya which has been "unwilling to accept a democratic outcome" to the civil war in Libya.He said that, while the militants in Libya may share a "common ideology" with Islamic rebels in Mali and Algeria, it was not likely they shared any organisational links.
"What we are seeing is a sympathetic response to what occurred in Algeria and Mali, and therefore a threat to Westerners. I am not even certain that the threat is specific to Britain," Prof Joffe added.
Benghazi was the stronghold of the National Transitional Council, the rebel group whose revolt eventually ended Col Muammar Gaddafi's hold on power in Libya.
On Wednesday, US Secretary of State Hillary Clinton testified in hearings on Capitol Hill, during which she was questioned about the attack on the US consulate and said al-Qaeda was on the rise in the region.
Last week, in neighbouring Algeria, militants took over a gas plant, taking hundreds hostage and claiming they were acting in revenge for events in Mali, where the French military have taken action against Islamist extremists.
It is thought 37 foreigners - including six UK nationals - died during the four-day siege, which ended after Algerian special forces stormed the compound.