Julian Assange has been granted asylum in Ecuador by President Rafael Correa, the government announced Tuesday.
The WikiLeaks founder has been holed up in Ecuador's embassy in London since June 19.
"Ecuador will grant asylum to Julian Assange," said an official in the Ecuadorean capital, Quito.
On Monday Correa said he would be deciding whether he would grant Assange asylum and was studying international law so he would make the proper choice.
Foreign Minister Ricardo Patiño had said the president would announce his decision once the London Olympics were over, but is not sure if Britain will actually allow Assange to fly to Ecuador. The gesture might be purely symbolic.
"For Mr. Assange to leave England, he should have a safe pass from the British. Will that be possible? That's an issue we have to take into account," Patiño told Reuters Tuesday.
The British government "discouraged the idea," he said, and the Swedish government, which wants to question Assange about rape allegations, was also "not very collaborative."
Patiño added: "We see Assange's request as a humanitarian issue. The contact between the Ecuadorean government and WikiLeaks goes back to May 2011, when we became the first country to see the leaked U.S. Embassy cables completely declassified. ... It is clear that when Julian entered the embassy there was already some sort of deal. We see in his work a parallel with our struggle for national sovereignty and the democratization of international relations."
The Guardian reported that Assange is currently living in a one-room building on the embassy grounds that has a high-speed Internet connection.
Ecuador reportedly accepts Assange's claim that if he extradited to Sweden he will then be extradited to the United States, where he could possibly face the death penalty. According to his supporters, the U.S. government has "secretly" indicted him after the 2010 WikiLeaks revelations embarrassed Washington.
Correa and Patiño both believe that granting Assange asylum in Ecuador would be a humanitarian act, according to the Guardian.