LONDON — When Julian Assange, the WikiLeaks founder, jumped bail and sought asylum in Ecuador’s embassy five years ago to avoid a Swedish rape investigation, he was considered by many a hero of transparency, internet freedom and resistance to the secret state.

So when Sweden’s prosecutors announced on Friday that they were abandoning their attempt to extradite him, invalidating the warrant for his arrest, Mr. Assange proclaimed it a happy moment of vindication. “Today was an important victory,” he said.

But Mr. Assange, 45, who became a persistent problem for the Obama administration and Hillary Clinton’s presidential campaign over leaks of classified and embarrassing documents, still faces enormous legal problems — which he also acknowledged.

He could be arrested in London for other reasons — and may possibly risk extradition to the United States — if he left the sanctuary of Ecuador’s embassy. And his reputation is far different than when he entered it in 2012.

Mr. Assange is now seen by many, including some who once had admired him the most, as an accomplice of the Russian propagandists and Donald J. Trump supporters who had sought to malign Mrs. Clinton.

His advocacy of disclosure has become intertwined with politically motivated leaks and stolen information technology, used by states and criminals alike.

And his assertion on Friday that Sweden had cleared his name for a crime he has denied was disputed by Sweden’s chief prosecutor, Marianne Ny.

Sweden was dropping the inquiry, Ms. Ny said, because she simply saw no way forward and “we don’t make any statement of guilty or not.”

Should Mr. Assange enter Sweden before August 2020, when the statute of limitations expires for the last remaining allegation, of minor rape, she said, the investigation could be reopened.

His Swedish accuser, through her lawyer, decried the decision. “It is a scandal that a suspected rapist can escape justice and thereby avoid the courts,” the lawyer, Elisabeth Fritz, said in a statement to news agencies. “My client is shocked.”

Mr. Assange appeared on the balcony of the Ecuadorean Embassy to thank supporters, protest what he called his long “detention” and vowed continued struggle against any charges laid against him.

“The road is far from over,” he said, raising a clenched fist. “The war, the proper war, is just commencing,” he added, referring to legal battles with Britain and potentially the United States.

Most uncertain for Mr. Assange is whether the United States has issued a secret arrest and extradition warrant in connection with his assistance to Chelsea Manning, who was released from prison this week after serving seven years of a 35-year sentence, in stealing and revealing United States secrets.

Image

Julian Assange on the balcony of the Ecuadorean Embassy in central London in 2016. He sought refuge there five years ago after the authorities in Stockholm opened a preliminary rape inquiry against him.CreditBen Stansall/Agence France-Presse — Getty Images

Just last month, the Trump administration’s Justice Department was reported to be reconsidering whether to charge Mr. Assange.

On Friday, the British Home Office and Crown Prosecution Service said they would not comment on any possible extradition request. The Justice Department also declined to comment.

While he is unlikely to risk walking out of the Ecuadorean Embassy, at least for now, reporters thronged the street outside the embassy on Friday just in case. They blocked traffic near the Harrods department store and glimpsed Mr. Assange’s puzzled-looking cat staring from a window.

The British police said that he was still subject to arrest for jumping bail, a much less significant offense, and that they would scale down their expensive surveillance of him.

It is possible Mr. Assange could slip out in the night, but he would still be a wanted man.

Kenneth Roth, the executive director of Human Rights Watch, said Mr. Assange should not be charged on current evidence.

“The U.S. government has never shown that Assange did anything but publish leaked information,” he said. “It may not like what he leaked but, judging from the public evidence, he stands in the same position as countless journalists and should now not be threatened with arrest and extradition to the United States.”

But rumors persist, however unconfirmed, that the Americans are investigating whether Mr. Assange provided Ms. Manning technical help in committing the theft of secrets, which could be a foundation for prosecution, and whether he could be charged with conspiracy in the theft of Democratic Party emails by Russian hackers.

Image

Journalists outside the Ecuadorean Embassy in London on Friday.CreditAndy Rain/European Pressphoto Agency

With Ecuador pressing Britain to allow Mr. Assange passage to Ecuador to receive political asylum there, according to the Ecuadorean foreign minister, Guillaume Long, British authorities may choose to be quietly rid of the troublesome Mr. Assange, who has been costly to surveil.

In a statement, Mr. Long said: “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.”

But Mr. Assange and WikiLeaks still pose a legal and political quandary for the Trump administration. He has closely overseen WikiLeaks even while living in the cramped quarters of the Ecuadorean Embassy, and has been increasingly seen as a direct conduit for Russian propaganda and cyberwarfare.

During the presidential campaign, Mr. Trump repeatedly expressed glee at WikiLeaks’ release of confidential emails from the Democratic National Committee and Mrs. Clinton’s campaign. Even after American officials said the emails had been given to WikiLeaks by hackers working for Russian intelligence, Mr. Trump read them aloud at rallies and declared, “I love WikiLeaks!” — infuriating American intelligence officials.

President Trump’s Justice Department has a different view.

Attorney General Jeff Sessions suggested last month that arresting Mr. Assange was “a priority” as part of a crackdown on leaks. The C.I.A. director, Mike Pompeo, said WikiLeaks was operating like “a hostile intelligence service” and that Mr. Assange was “a fraud.”

Mr. Trump equivocated when asked in a recent interview with The Associated Press whether he still supported Mr. Assange. “I don’t support or unsupport. It was just information,” Mr. Trump said, referring to the hacked emails.

Of the attorney general’s plan to have Mr. Assange arrested, the president said, “I am not involved in that decision, but if Jeff Sessions wants to do it, it’s O.K. with me.”

As a legal matter, whether to charge Mr. Assange or others associated with WikiLeaks is considered a conundrum. The Obama administration’s Justice Department presented evidence to a grand jury in Alexandria, Va., but was deterred because it proved difficult to distinguish what WikiLeaks had done with classified information from what The New York Times and many other mainstream news organizations do. Given the constitutionally protected freedom of the press, only government officials who leak classified information have been prosecuted, not journalists who publish it.

Further complicating matters, the decision may no longer be solely up to Mr. Trump or his subordinates. The appointment this week of the former F.B.I. director Robert S. Mueller III as special counsel to oversee the investigation into Russia’s efforts to interfere with the 2016 election could include transferring responsibility for WikiLeaks to him, especially if there are separate charges of conspiracy with Russia to steal Democratic Party emails.

Ms. Manning has always insisted she acted alone. Mr. Assange, who had said that he would be willing to be extradited to the United States if Ms. Manning were released from prison, reneged on his promise.

“I’ve always been willing to go to the United States,” he said in an online news conference in January, “provided my rights are respected.”

Glenn Greenwald, the journalist who worked with Edward J. Snowden and is among those more ambivalent now about Mr. Assange, summarized the dilemma on Friday. Writing on The Intercept, he said: “The termination of the Swedish investigation is, in one sense, good news for Assange. But it is unlikely to change his inability to leave the embassy any time soon. If anything, given the apparent determination of the Trump administration to put him in a U.S. prison cell for the ‘crime’ of publishing documents, his freedom appears farther away than it has since 2010, when the Swedish case began.”

David Allen Green, a lawyer who has followed the Assange case, suggested on Twitter that Mr. Assange was in more jeopardy now, since Britain would act on any American extradition request without first sending Mr. Assange to Sweden.

Still, for Mr. Assange, it was a happy day. He posted a photograph of himself on Twitter smiling broadly, though later posted an angrier response: “Detained for 7 years without charge by while my children grew up and my name was slandered. I do not forgive or forget.”

Mr. Assange’s Swedish lawyer, Per E. Samuelson, described it as a “day of victory” mixed with foreboding.

“The United States is chasing him,” he said. “They have made that clear.”

Steven Erlanger reported from London, and Christina Anderson from Stockholm. Reporting was contributed by Dan Bilefsky, Iliana Magra and Michael Wolgelenter from London, and Scott Shane and Charlie Savage from Washington.

A version of this article appears in print on , on Page A7 of the New York edition with the headline: Assange Rape Inquiry Is Dropped, but His Legal Troubles Remain Daunting. Order Reprints | Today’s Paper | Subscribe