Ecuador has reached an agreement with Sweden to allow Swedish officials to interrogate Julian Assange at the Ecuadorian embassy in London on sex assault charges.

The Wikileaks founder has been living in the Ecuadorian embassy for three years in an effort to avoid being extradited to Sweden where he faces charges from a 2010 incident involving two women.

According to the BBC, Baltasar Garzon, the coordinator behind Assange's international legal defense team, expressed satisfaction at the legal turn of events. "Julian Assange's rights need to be respected by Sweden and the United Kingdom,” he said, adding, “These countries have failed to do so until now.”

Assange, who denies the assault accusations, has been fearful that if he were to go to Sweden he could then be extradited to the United States where he might face trial for publishing U.S. classified documents on Wikileaks. The British government, which has been trying to arrest Assange stated it is not its not up to them on how to proceed with the case.

"It is for the Swedish prosecutor to decide how they now proceed with the legal case," a spokeswoman for the British Foreign Office said.

The agreement, which ensures that Assange’s human rights will be observed in the course of his impending interrogation, was signed in Ecuador after about six months of investigations occurred.

CNN reports Swedish Justice Ministry official Cecilia Riddselius has confirmed that both governments had reached a general agreement in the matter.

WikiLeaks has published thousands of classified government documents since it was launched in 2006.

Speaking to Speigel earlier this year, Assange said that WikiLeaks remains a source of anxiety for the U.S. government. “Every federal government employee and every contractor received an email stating that if they read something from WikiLeaks including through the New York Times website, they have to remove this from their computer immediately and self-report,” said Assange.