(CNN) -- Ecuador granted Julian Assange asylum over fears of political persecution Thursday, but it was hardly a reprieve as Britain vowed to extradite the WikiLeaks founder to Sweden to face questioning on sex crime charges.
Assange, the publisher of hundreds of thousands of secret U.S. government documents, has been holed up in the Ecuadorian Embassy in London since June.
Ecuadorian Foreign Minister Ricardo Patiño said Thursday there is credible fear that if Assange is sent to Sweden, he could be subsequently be extradited to the United States, where he could be charged with espionage and treason.
In the United States, there are no guarantees that Assange would receive a fair trial or that he wouldn't be subject to a military or secret tribunal, Patiño added.
"The Ecuadorian government, after carrying out a fair and objective analysis of the situation presented by Mr. Assange and evaluating his oral and written arguments, has decided that there's cause to presume that he could be the target of political persecution or that such persecution could happen if no timely and necessary measures are taken to prevent it," Patiño said.
Ecuador asked Britain to guarantee safe passage for Assange and to respect its decision.
But the UK said it was disappointed by the decision and will continue work toward Assange's arrest and extradition.
"We shall carry out that obligation. The Ecuadorian government's decision this afternoon does not change that," the UK Foreign Office said in a statement.
Britain wants a negotiated solution that will result in extradition.
"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," Assange said from the embassy, according to a WikiLeaks news release.
Patiño preceded his announcement Thursday with a lengthy argument against any British action against Ecuador's embassy in London. In remarks Wednesday, he said the Ecuadorian government had received a written notice from British authorities that they would "assault" the country's embassy in London if Ecuadorian officials failed to hand over Assange.
The British say one of their laws allows for the country to enter the embassy and arrest Assange. Patiño cited a laundry list of international treaties and conventions that he said make it clear that it is illegal to enter another country's embassy.
The UK, in effect, is saying "we are going to savagely hit you depending on how you behave," Patiño said.
The foreign minister outlined 11 conclusions that Ecuador reached in reviewing the WikiLeaks founder's asylum request. In short, Ecuador found that Assange has a credible fear of persecution for his ideas and politics. The government described him as an activist for freedom of the press and freedom of expression who would be silenced if sent to Sweden and, possibly, the United States.
"There are strong indications of retaliation by the country or countries who produced the information divulged by Mr. Assange, reprisals that could put at risk his security, integrity and even his life," the Ecuadorian government concluded.
Assange and his supporters say that a grand jury has been empaneled in the United States to consider charges against him. U.S. Attorney General Eric Holder has said that the Justice Department is conducting an "active, ongoing criminal investigation" into the WikiLeaks disclosure of classified U.S. diplomatic documents.
WikiLeaks condemned Britain's assertion that it could enter the embassy in a statement released early Thursday.
"A threat of this nature is a hostile and extreme act, which is not proportionate to the circumstances, and an unprecedented assault on the rights of asylum seekers worldwide," the statement said.
After the announcement, Sweden said it took umbrage to the implication that it does not guarantee the rights of those in its custody, and called the Ecuadorian ambassador there to a meeting.
"Sweden does not extradite individuals who risk facing the death penalty," a Swedish Foreign Ministry spokeswoman said.
The ministry said on its official Twitter account that this was an "unacceptable attempt by Ecuador to stop the Swedish judicial process and the European judicial cooperation."
British police arrested at least two protesters outside the Ecuadorian Embassy in London before the asylum announcement was made.
The Foreign Office said there was a larger "police presence outside the British Embassy in Quito" than at the Ecuadorian mission in London.
Assange has been holed up there since petitioning for asylum in June. He is seeking to avoid being sent to Sweden over claims of rape and sexual molestation, and said he fears that if extradited, Swedish authorities could eventually hand him over to the United States.
Assange was arrested in Britain in 2010 because Swedish authorities wanted to question him about the allegations. Two women have accused him of sexually assaulting them during an August 2010 visit to Sweden in connection with a WikiLeaks release of internal U.S. military documents. Assange denies the allegations and argues they are in retribution for his organization's disclosure of American secrets.
His bail conditions required he spend his nights at the home of a supporter outside London. He is subject to arrest for breaking the terms of his bail, London's Metropolitan Police said the day after he entered the embassy.
WikiLeaks has published about 250,000 U.S. diplomatic cables, causing embarrassment to the U.S. government and others. It also has published hundreds of thousands of classified U.S. documents relating to the conflicts in Iraq and Afghanistan.
Assange sought refuge at the embassy five days after the Supreme Court in Britain dismissed his bid to reopen his appeal of the decision to send him to Sweden, his last option in British courts.
CNN's Rafael Romo, Richard Greene and Per Nyberg contributed to this report.