Sweden on Friday dropped its investigation into WikiLeaks founder Julian Assange for suspected rape, though he still faces arrest if he leaves the Ecuadorean embassy in London where he has received diplomatic asylum for almost five years.

Marianne Ny, Sweden's top public prosecutor, said in a statement that the probe was dropped because prosecutors "exhausted the possibilities to continue the investigation," and "there is no reason to believe that the decision to surrender him to Sweden can be executed in the foreseeable future."

Assange, 45, who denied committing any sex offenses related to allegations made by two women in Sweden in 2010, has been holed up in the embassy since June 2012. He was granted asylum there in August 2012 over fears that if he was detained by British police they would extradite him to Sweden, which would then send him onward to the United States for prosecution over WikiLeaks’ publication of secret documents, including thousands of U.S. diplomatic cables.

Ny told a news conference that the investigation could be reopened if Assange returns to Sweden before the statute of limitations lapses in 2020. A European arrest warrant for Assange has been withdrawn, but he still faces arrest from British police because he skipped bail after failing to attend court in relation to that warrant.

In August 2015, Swedish prosecutors dropped their investigation into a separate allegation against Assange of sexual molestation and one of unlawful coercion because a five-year limit for bringing charges expired. The rape allegation was the only one outstanding.

Assange posted a picture of himself smiling broadly to his Twitter account soon after the Swedish authorities' announcement Friday. He later tweeted: "Detained for 7 years without charge by while my children grew up and my name was slandered. I do not forgive or forget."

The Metropolitan Police Service said it is obliged to arrest Assange if he leaves the embassy because he failed to show up in court in June 2012.

Last month, CNN reported U.S. authorities had prepared charges to seek Assange's arrest while The Washington Post reported U.S. federal prosecutors were weighing charges against WikiLeaks members after the Justice Department declined to do so during President Obama's time in office.

WikiLeaks tweeted Friday that the United Kingdom "refuses to confirm or deny" whether it has already received a warrant for Assange to be extradited to the U.S. The U.K. Home Office says it does not confirm or deny that a request for extradition has been made until an arrest is made in relation to the relevant extradition.

The U.S. Department of Justice declined to comment on Friday's developments.

The drop of the investigation comes two days after Chelsea Manning was released from military prison in Kansas after serving seven years of a 35-year sentence for leaking thousands of documents including battlefield reports on Iraq and Afghanistan and State Department cables to WikiLeaks. Her sentence was commuted in the final days of the Obama administration.