In a high-wire political act, Ecuador on Thursday granted asylum to WikiLeaks founder Julian Assange, ignoring a threat from the British government to strip it of its diplomatic status and storm its embassy in London to arrest Mr. Assange for breaching his bail conditions.

He has been holed up at the embassy since seeking refuge there in June to avoid extradition to Sweden over allegations of sexual assault.

British Foreign Secretary William Hague made clear that Mr. Assange would not be given safe passage out of the country and indicated that the diplomatic stand-off could drag on for some “considerable” time.

Mr. Assange described the decision as a “historic victory’’ while his supporters, gathered outside the embassy, repeatedly clashed with the police who surrounded the building to prevent him from leaving. However, there appeared to be no immediate move to enter the embassy.

Ecuador’s Foreign Minister Ricardo Patino denounced the British threat as a “blatant disregard” for international law, a “type of blackmail” and unbecoming of “a democratic, civilised and rule-abiding country.”

“We are not a British colony,” he retorted after Britain invoked an obscure law that allows it to revoke the diplomatic status of an embassy under certain circumstances.

Mr. Patino said the decision to grant asylum to Mr. Assange was prompted by a concern for Mr. Assange’s human rights as his government believed that his fears of “political persecution’’ were “legitimate.”

Mr. Assange fears that if extradited to Sweden he could be handed to the American government which wants to prosecute him for publishing secret official documents.

“We believe that his fears are legitimate and there are threats that he could face political persecution. The Ecuador government, loyal to its tradition to protect those who seek refuge with us at our diplomatic missions, has decided to grant diplomatic asylum to Mr. Assange,” said Mr. Patino.

Britain said it was “disappointed” by the decision and stressed its “obligation” to extradite Mr. Assange to Sweden pointing out that he had exhausted all legal options in Britain.

“We shall carry out that obligation. The Ecuadorian government’s decision does not change that. We remain committed to a negotiated solution that allows us to carry out our obligations under the Extradition Act,” the Foreign Office said. Sweden called the decision “unacceptable” and sought an explanation from Ecuador’s Ambassador.

More In: International | News