Muammar Gaddafi's regime has condemned the UK for recognising the rebel National Transitional Council (NTC) as the "sole governmental authority" in Libya.
Deputy foreign minister Khaled Kaim said the decision was "unprecedented in diplomatic history" and that he considered it "a stain on the forehead of Britain".
Mr Kaim told reporters: "It's illegal, it's irresponsible and for us it was a surprise to happen from the British Government because, I mean, if other countries will (follow) Britain, then the international diplomacy will be chaos."
The deputy foreign minister said Libya would try to reverse the decision by taking legal action in both British courts and the International Court of Justice.
Mr Kaim's comments came after Foreign Secretary William Hague announced Britain was recognising the NTC after similar moves by France and the US.
Mr Hague said the remaining regime diplomats in Britain would be expelled and the Libyan embassy in Knightsbridge, west London, handed over to the rebel council.
He added that the move would enable the UK to offer greater practical assistance to the rebels, starting with the unfreezing of assets worth £91 million belonging to the NTC-controlled Arabian Gulf Oil Company.
The decision to recognise the NTC follows an agreement by the international contact group on Libya, meeting in Istanbul on July 15, to deal with the NTC as the legitimate governing authority in the country.
"This decision reflects the National Transitional Council's increasing legitimacy, competence and success in reaching out to Libyans across the country," Mr Hague told a Foreign Office news conference yesterday.
"Through its actions, the National Transitional Council has shown its commitment to a more open and democratic Libya, something that it is working to achieve in an inclusive political process.
"I'm making this announcement to reflect the facts on the ground and to increase support for those fighting and working for a better future in Libya."
Mr Hague said the NTC's actions were in sharp contrast to those of Gaddafi whose attacks on his own people had "stripped him of all legitimacy".
The UK has already established a diplomatic mission in the NTC stronghold of Benghazi, having suspended the activities of its embassy in Tripoli since February.
Britain would now deal with the NTC "on the same basis as other governments around the world" and would begin work on unfreezing further assets, including currency stocks of the Libyan central bank, held in the UK, Mr Hague said.
He said that the announcement had been delayed to ensure that Libyan students studying in Britain did not lose out on the financial support which they had been receiving through the embassy.
The Libyan charge d'affaires was summoned to the Foreign Office yesterday morning to be told that he and his remaining diplomats must now leave the country.
NTC spokesman Guma al-Gamati welcomed the move, saying that it was a matter of "when, not if" Gaddafi was forced out of power in Tripoli.
"It's a very significant step, it's a very important step," he told BBC Radio 4's World At One.
"It's significant because, as Secretary Hague said, normally the UK only recognises states but now it has recognised the NTC as the legitimate government of Libya."
Shadow foreign secretary Douglas Alexander also backed the decision, saying that it was important to "maximise the diplomatic pressure" on the regime.
Following the announcement, a handful of anti-Gaddafi demonstrators gathered outside the embassy and shouted angrily at the staff inside.
One man, who said he was from the city of Misrata, shouted: "Get out rats. You murdered my brother-in-law. Thank you UK. Thank you USA."