WikiLeaks founder Julian Assange has been granted political asylum by Ecuador after taking refuge in the country's embassy in London.

The decision was announced by foreign affairs minister Ricardo Patino in the Ecuadorian capital Quito.

Mr Patino said: "The government of Ecuador is certain that the British government know how to value justice and righteousness of the Ecuadorian position and, consistent with these arguments, confident that the UK will offer, as soon as possible, safe passage guarantees necessary."

Mr Assange sought sanctuary in the embassy in Knightsbridge in an effort to avoid deportation to Sweden, where he faces sexual assault charges. He denies the allegations.

British Foreign Secretary William Hague has insisted the government would not allow Mr Assange safe passage out of the country.

Mr Hague said that political asylum should not be used to escape the regular court process.

He added that the government is determined to see Mr Assange extradited to Sweden.

Sweden's Foreign Ministry has said it was summoning Ecuador's ambassador after the decision.

"Ecuador has unacceptably stopped the Swedish judicial process and has hindered European judicial cooperation," said a ministry spokesman.

Ecuadorian ministers accused the UK of threatening to "attack" the embassy to seize 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.

However, Mr Hague said that there is no threat to storm the embassy.

A spokesman for Mr Assange announced this evening that he will give a live statement in front of the embassy on Sunday, although it was unclear if the WikiLeaks founder would risk arrest by appearing in person outside the building.

"Julian Assange will give a live statement in front of the Ecuadorian embassy, Sunday, 2 pm," WikiLeaks said in a message on Twitter. "It will be his first public appearance since March."

A small group of protesters chanting slogans in support of Mr Assange gathered outside the embassy today.

A Reuters reporter saw at least three protesters being dragged away by police as the crowd shouted: "You are trying to start a war with Ecuador."

Mr Assange, a former computer hacker, angered the US in 2010 when his WikiLeaks website published secret diplomatic cables.

Mr Assange has been taking refuge in the embassy since 19 June.

The Australian anti-secrecy campaigner said he feared he could be sent to the US, where his life would be at risk.