ON AUGUST 17thEcuador announced its decision to grant diplomatic asylum to Julian Assange, founder of WikiLeaks, the organisation which has published reams of classified documents to the consternation of governments around the world. Two months earlier Mr Assange had entered Ecuador’s London embassy to avoid extradition to Sweden, where he faces questioning for alleged sexual abuse. Bespectacled and in his gravelly Guayaquil accent, Ecuador’s foreign minister, Ricardo Patiño, rallied the Americas against Britain’s display of “gross blackmail” in threatening to arrest Mr Assange on the premises of the London embassy. Even diehard opponents of Rafael Correa, Ecuador’s president, railed against Britain’s ham-handed invocation of a never-used, 1987 law to insinuate that it could, eventually, have the right to enter the embassy. Mr Patiño seized the opportunity to claim that Britain had already committed a “hostile and unfriendly act”. The row has taken British-Ecuadorean relations to a new low. Britain appears to have delayed dispatching a new ambassador to the embassy flat in Quito, Ecuador’s capital, which it shares with Germany and which is already almost bereft of British staffers. But the Foreign Office may be right to question whether Ecuador’s actions adhere to the Vienna Convention on diplomatic relations. Having bonded with the Mr Correa during a recent interview for Russia Today, a Kremlin-backed television channel, Mr Assange’s request for asylum was preceded by lengthy talks with the populist regime. WikiLeaks staffers visited Quito to sound out the situation, and the embassy prepared a room in its London flat for his arrival. According to an official close to Mr Correa, the president gave his approval for Mr Assange’s asylum request on the condition that it would be a straightforward matter. But unbeknownst to his inexperienced crop of diplomats, says the official, European countries, unlike Latin American ones, mostly do not accept the concept of diplomatic asylum. After a private presidential tongue lashing, Mr Patiño was set to work to provide the legal dossier in favour of Mr Assange’s appeal. The question was not if, but how, Ecuador would grant him asylum. Mr Patiño presented a lengthy paper invoking international law and human rights to defend Mr Assange, and demonstrate Ecuador’s willingness to negotiate with Sweden, Britain, and America. While the United States has not charged him with a crime, Mr Assange fears he could ultimately face the death penalty there for his role in publishing hundreds of thousands of classified American documents.

Yet the issue of how to extract him from Britain remains problematic. Britain’s refusal to provide safe passage to Ecuador, and Sweden’s refusal to question him on the embassy’s premises, could mean Mr Assange remains in the embassy for at least the duration of Ecuador’s upcoming election campaign. For Mr Correa, the Australian former hacker is proof that Ecuador is not, as foreign and private domestic media insist, a threat to its people’s freedom of expression. Still, since Mr Assange moved into the embassy, the government has seized the computers of the critical magazine Vanguardia on trumped-up charges for the second time, and opened individuals’ internet protocol (IP) addresses to government scrutiny. And, Alexander Barankov, a Belarusian former army captain, faces extradition to Belarus at that government’s request, despite Ecuador having previously awarded him refugee status.

But Ecuador will not want to host Mr Assange in its London embassy forever, says Michel Levi, professor of international relations at the Andina Simón Bolívar University in Quito. "I think he will end up in Sweden, with special conditions granted for his eventual trial," he says. On Sunday Mr Assange was due to make a statement from the embassy, in which sources close to him suggest that he may offer to cooperate with Sweden if guarantees are given that he would not face extradition to a third country.

UPDATE: Speaking from a balcony at the embassy on Sunday, Mr Assange thanked the government and people of Ecuador for granting him asylum in their country, and urged America to renounce its “witch-hunt” of WikiLeaks and “war on whistleblowers”. See his speech here