Swedish prosecutor Ingrid Isgren passes a banner put up by a supporter of Wikileaks founder Julian Assange as she walks to a vehicle, on the second day at the Ecuadorian embassy in London, Tuesday, Nov. 15, 2016. (AP/Matt Dunham)

Swedish prosecutors dropped the rape investigation into WikiLeaks founder Julian Assange on Friday, saying the investigation had not been able to proceed because of legal obstacles.

“We are not making a statement about his guilt,” Swedish Chief Prosecutor Marianne Ny said.

Assange, 45, has lived in the Ecuadorean Embassy in London since 2012 when he took refuge to avoid extradition to Sweden over the rape allegations. He feared Sweden would hand him over to the United States to face prosecution for information leaks as thousand of classified military and diplomatic documents were published by WikiLeaks.

Ecuador’s government welcomed the decision by Sweden, but said it was long overdue.

“Ecuador regrets that the Swedish Prosecutor delayed more than four years in carrying out this interview,” said Ecuadorean Foreign Minister Guillaume Long. “This unnecessary delay was despite the repeated insistence from the Ecuadorean government – ever since the granting of asylum in 2012 – that this interview was not only possible but that Ecuador would facilitate its carrying out in our Embassy.”

Assange’s lawyer Per Samuelson said the drop of the investigation is a “total victory” for them.

“The preliminary investigation has been dropped and the detention order has been withdrawn, and from Sweden’s point of view this is now over,” Samuelson told Reuters.

Ny added that the investigation could be reopened if Assange came to Sweden before the statute of limitations deadline for rape allegation in 2020.

After a 7-year stand-off with Sweden, Assange may still not be able to leave the Ecuadorean embassy. British police said if Assange were to leave the embassy, it was still their obligation to arrest him. But the British government has not commented on whether the United States had made a request to extradite Assange.

“Given that the European arrest warrant no longer holds, Ecuador will now be intensifying its diplomatic efforts with the U.K. so that Julian Assange can gain safe passage in order to enjoy his asylum in Ecuador,” said Long.

“Westminster Magistrates’ Court issued a warrant for the arrest of Julian Assange following him failing to surrender to the court on the 29 June 2012,” British police said. “The Metropolitan Police Service is obliged to execute that warrant should he leave the Embassy.”

The United Nations has decried the unfair treatment of Assange, declaring that he was being arbitrarily detained and that his human rights were being violated.

Professor Mads Andenas, chair of the U.N. Working Group on Arbitrary Detention, also welcomed the decision to drop the investigation.

“This is a victory for the rule of law,” said Andenas. “The warrant was contestable.”