WikiLeaks founder Julian Assange waves from a window with Ecuador's Foreign Affairs Minister Ricardo Patino (R) at Ecuador's embassy in central London, June 16, 2013. Assange sought asylum in the embassy on June 19, 2012, in an attempt to avoid extradition to Sweden. Ecuador ratified Assange's diplomatic asylum status on Friday. Reuters/Chris Helgren

Ecuador ratified Friday its diplomatic asylum status for WikiLeaks founder Julian Assange, who has been living in the country’s London embassy since June 2012 to avoid being extradited to Sweden, where he faces sexual assault charges. The move makes official Assange’s protected status and means he can remain under the country’s protection indefinitely.

"In keeping with its long tradition of human rights, particularly those of the victims of political persecution, Ecuador reaffirms its commitment to protect the life and liberty of the citizen Julian Assange,” said a statement from Ecuador’s Foreign Ministry posted by Nuestra Tele Noticias.

The announcement comes a day after a Swedish court upheld an order to detain Assange, 43, over sexual assault allegations. Assange’s lawyers requested to have the order withdrawn because it cannot be enforced while Assange remains under Ecuador’s protection against winding up in U.S. custody.

Ecuador has been shielding Assange from extradition out of concern Sweden will pass him to U.S. officials, who view the Australian publisher and journalist as a fugitive from justice. Assange is wanted for his role in obtaining and leaking hundreds and thousands of U.S. diplomatic cables and Army reports from Pfc. Bradley Manning, who is serving 35 years for obtaining and giving the documents to WikiLeaks.

Ecuador’s human rights law doesn’t permit extradition of people to countries where they could face the death penalty. The U.S. Espionage Act of 1917 could allow federal prosecutors to pursue capital punishment if Assange is found to have aided the country’s enemies by leaking the documents.

The Swedish Prosecution Authority has pursued Assange since 2010 to further a preliminary investigation into rape and molestation allegations involving two women. But because Sweden has an extradition treaty with the United States, the country could pass Assange to U.S. authorities.

On Friday Ecuador said it was confident it could “reopen promptly channels for political dialogue at the highest level with the government of Sweden,” and offered to allow Swedish authorities to take statements from Assange either by visiting the Ecuadorean embassy in London or by electronic means.