In a statement, the Swedish Prosecution Authority said: "Almost five years ago Julian Assange was permitted refuge at the Ecuadorian embassy in London, where he has resided ever since. In doing so, he has escaped all attempts by the Swedish and British authorities to execute the decision to surrender him to Sweden in accordance with the EU rules concerning the European Arrest Warrant.
"According to Swedish legislation, a criminal investigation is to be conducted as quickly as possible. At the point when a prosecutor has exhausted the possibilities to continue the investigation, the prosecutor is obliged to discontinue the investigation.
"At this point, all possibilities to conduct the investigation are exhausted. In order to proceed with the case, Julian Assange would have to be formally notified of the criminal suspicions against him. We cannot expect to receive assistance from Ecuador regarding this. Therefore the investigation is discontinued."
"In view of the fact that all prospects of pursuing the investigation under present circumstances are exhausted, it appears that it is no longer proportionate to maintain the arrest of Julian Assange in his absence. Consequently, there is no basis upon which to continue the investigation."
Britain's Press Association quoted an Ecuadorian foreign ministry source as saying Ecuador would now seek safe passage for Assange to leave its embassy.
"Given that the European Arrest Warrant no longer holds, Ecuador will now be intensifying its diplomatic efforts with the UK so that Julian Assange can gain safe passage in order to enjoy his asylum in Ecuador," the source was quoted as saying.
The British government has refused to confirm or deny whether it has received an extradition request from the US to send Assange over there.
Earlier, soon after the initial news broke, the London Metropolitan Police issued a statement. It said: "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. The Metropolitan Police Service is obliged to execute that warrant should he leave the Embassy.
"Whilst Mr Assange was wanted on a European Arrest Warrant (EAW) for an extremely serious offence, the MPS response reflected the serious nature of that crime. Now that the situation has changed and the Swedish authorities have discontinued their investigation into that matter, Mr Assange remains wanted for a much less serious offence. The MPS will provide a level of resourcing which is proportionate to that offence.
"The MPS will not comment further on the operational plan. The priority for the MPS must continue to be arresting those who are currently wanted in the Capital in connection with serious violent or sexual offences for the protection of Londoners."
In the US, there is a grand jury reportedly waiting to issue an indictment over Assange's alleged involvement in the leaks of confidential documents by former US soldier Chelsea Manning, documents about the US invasion of Iraq in 2003. Manning was freed on Thursday, having been pardoned by former US president Barack Obama.
Assange has been taking refuge in the Ecuadorian embassy in London since 2012, after the British government sought to extradite him to Sweden to face an investigation into the alleged rape charges.
His problems began when he visited Sweden in August 2010 to attend a conference where he was scheduled to give a talk. During that visit, he had sex with two women whom he met. The pair filed rape and molestation complaints against him later, claims that he denied.
He was questioned by Swedish authorities and cleared of all accusations. He could have left the country then and there but stayed for a while, in case the authorities decided to question him again.
Interpol issued a Red Notice for his arrest on 20 November 2010. On 27 November, Assange surrendered to authorities and appeared before a Westminster judge. Bail was granted to him in December after his backers provided £240,000 in cash and sureties.
Then began a protracted period of legal back and forth that went on until June 2012, when Swedish prosecutors sought his extradition.
Assange's lawyers, among them the world-renowned Australian Geoffrey Robertson, replied that if he agreed to the extradition request, then he could be flown to the US from there.
On 19 June 2012, he jumped bail and took refuge in the Ecuadorian embassy in London, seeking asylum in the South American country. British police surrounded the building and blocked any chance of his leaving.
Ecuador granted him asylum in August 2012. He has had to stay inside the four walls of the embassy since then.