Ecuador and Sweden have signed a pact that would allow WikiLeaks founder Julian Assange to be questioned at Ecuador's embassy in London where he has been for more than three years, the Quito government said.
The legal agreement was signed in the Ecuadorean capital after half a year of negotiations.
"It is, without doubt, an instrument that strengthens bilateral relations and will facilitate, for example, the fulfillment of judicial matters such as the questioning of Mr. Assange," the foreign ministry said in a weekend statement.
For more on this story, scroll through the gallery below:
Assange, 44, took refuge in the embassy building in June 2012 to avoid extradition to Sweden, where he is wanted for questioning over allegations of sexual assault and rape against two women in 2010. The Australian denies the accusations.
Assange says he fears Sweden will extradite him to the United States where he could be put on trial over WikiLeaks' publication of classified military and diplomatic documents five years ago, one of the largest information leaks in U.S. history.
Britain has accused Ecuador of preventing the course of justice by allowing Assange to remain in its embassy in the upmarket central London area of Knightsbridge.
More from AOL.com:
Fire at Russian mental health clinic in Voronezh region kills 23
Blind mother's tears as bionic eye gives first glimpse of son in 20 years
First woman is elected to Saudi local council