WikiLeaks founder Julian Assange has been granted political asylum by Ecuador, the country's foreign minister Ricardo Patino has confirmed.
Mr Assange entered the embassy in central London two months ago in a bid to avoid deportation to Sweden where he faces sexual assault charges.
The Foreign Secretary William Hague said it was a "matter of regret" that the Ecuadorian government decided to grant the Wikileaks founder political asylum but warned that it "does not change the fundamentals" of the case.
Speaking at the Foreign and Commonwealth Office, Mr Hague said:
We will not allow Mr Assange safe passage out of the United Kingdom, nor is there any legal basis for us to do so.
It is well established that, even for those countries which do recognise diplomatic asylum, it should not be used for the purposes of escaping the regular processes of the courts. And in this case that is clearly what is happening.
Earlier, Mr Patino said the Ecuadorian government had lengthy diplomatic talks with the UK, US and Sweden over Mr Assange.
The foreign minister said none of the three countries could give a guarantee that the WikiLeaks founder would not eventually be extradited to the US.
– Ecuador's Foreign Minister Ricardo Patino
The response from the United States has been that it cannot offer any guarantees.
With these precedents in mind the Ecuadorian government, loyal to its tradition to protect those who seek refuge with us and in our diplomatic mission, have decided to grant diplomatic asylum to Mr Assange.
Mr Assange welcomed the decision, calling it a "significant victory" but warned Ecuadorian embassy staff that "things will get more stressful now".
– Julian Assange
I am grateful to the Ecuadorian people, President Rafael Correa and his government. It was not Britain or my home country, Australia, that stood up to protect me from persecution, but a courageous, independent Latin American nation.
While today is a historic victory, our struggles have just begun. The unprecedented US investigation against WikiLeaks must be stopped."
The Foreign Office said they were "disappointed" by the decision.
The announcement is likely to increase tensions between the UK and the South American country who had been warned that the situation could have "serious implications" for diplomatic relations.
Ecuadorian ministers accused the UK of threatening to "attack" the embassy to arrest Mr Assange after it emerged that a 1987 law could allow the revocation of a building's diplomatic status if the foreign power occupying it "ceases to use land for the purposes of its mission or exclusively for the purposes of a consular post".
Under international law, diplomatic posts are considered the territory of the foreign nation.
Mr Patino called for Mr Assange to be guaranteed "safe passage" to leave the embassy but the Foreign Office insisted this would not be offered.
We trust that the United Kingdom will offer, as soon as possible, the guarantee for the safe passage for this asylum of Mr Assange and that they would respect those international agreements that they have signed in the past and that they have always respected.
Outside the Embassy of Ecuador in London, scores of supporters chanted Mr Assange's name and said they are determined to hold a vigil to make sure no attempt was made to arrest the WikiLeaks founder.