The announcement means the outspoken WikiLeaks leader no longer faces sex crime allegations in Sweden, although British police say he is still wanted for jumping bail in Britain in 2012.
Friday was the deadline for the Swedish prosecution to send a request to Stockholm District Court in the Assange case.
Assange, 45, took refuge in Ecuador's embassy in London in 2012 to escape extradition to Sweden to answer questions about sex-crime allegations from two women. He has been there ever since, fearing that if he was in custody he might ultimately be extradited to the United States for his role at the helm of WikiLeaks, which has enraged governments around the world by publishing tens of thousands of leaked classified U.S. documents.
"This is a total victory for Julian Assange. He is now free to leave the embassy when he wants. We have won the Assange case. He is of course happy and relieved. He has been critical that it has lasted that long," Per E. Samuelsson, his lawyer in Sweden, told Swedish Radio.
It's not known if U.S. officials are seeking Assange's arrest because of a possible sealed indictment. Last month President Donald Trump said he would support any decision by the Justice Department to charge Assange.
WikiLeaks tweeted after the Swedish announcement: "UK refuses to confirm or deny whether it has already received a US extradition warrant for Julian Assange. Focus now moves to UK."
The Swedish Prosecution Authority said Friday that chief Marianne Ny "has decided to discontinue the investigation" and Ny said she will call back the European arrest warrant on Assange.
Ny told reporters that the WikiLeaks founder had "tried to dodge all attempts at arrest" by British and Swedish authorities. She said prosecutors had been unable to make a full assessment of the case and were not making a finding on whether Assange was guilty of the allegations.
She said the case could be reopened if Assange returns to Sweden before the statute of limitations expires in 2020.
Prosecutors frustrated by Assange's refusal to return to Sweden for questioning eventually came to London to meet with him at the Ecuadorean Embassy last year.
Samuelsson, the lawyer in Sweden, told Swedish Radio he had been in touch with Assange via text message and the Australian had written, "Serious, Oh My God."
British police said despite Sweden's decision to drop a rape investigation, Assange still faces arrest if he leaves Ecuador's embassy in London. The Metropolitan Police says there is a British warrant for Assange's arrest after he jumped bail in 2012, and the force "is obliged to execute that warrant should he leave the embassy."
But it added that Assange is now wanted for a "much less serious offense" than the original sex crimes claims, and police "will provide a level of resourcing which is proportionate to that offense."
British police kept up round-the-clock guard outside the embassy until December 2015, when the operation was scaled back, in part because of the cost, which had exceeded 11 million pounds (over $17.5 million at the time).
Assange and WikiLeaks have repeatedly infuriated U.S. officials with the widespread release of sensitive secret documents related to military operations in Afghanistan and Iraq and diplomatic relations around the world. WikiLeaks also had a provocative role in the 2016 U.S. presidential campaign when it published emails written by Hillary Clinton campaign officials.
Army Pvt. Chelsea Manning served seven years in prison for giving classified material to WikiLeaks. She was freed Wednesday, having had her sentence commuted by outgoing President Barack Obama before he left office.