“Memories fade for natural reasons,” Ms. Persson said, but she emphasized that the “injured party has submitted a credible and reliable version of events.”

“Her statements have been coherent, extensive and detailed,” Ms. Persson said about one of the complainants. “However, my overall assessment is that the evidential situation has been weakened to such an extent that there is no longer any reason to continue the investigation.”

Asked by reporters about the length of the procedure — almost 10 years — Ms. Persson said that the extensive news coverage could have affected th e case’s viability.

“You have to consider how much the witnesses will have read and heard from the media,” she said.

The Swedish authorities dropped the investigation in 2017, but it was reopened this year after Mr. Assange was arrested in London and a lawyer for one of the alleged victims asked for it to be revisited, the prosecutor said. Mr. Assange, who is Australian, has always denied the accusations, and his lawyers have repeatedly accused the complainants of trying to unjustly slur the WikiLeaks founder.

Mr. Assange was detained last year and jailed for jumping bail after Ecuador abruptly withdrew its protection of him. The United States is seeking his extradition over accusations that he tried to assist in a breach of classified data.

In September, a British court ruled that Mr. Assange must stay in a British jail until his extradition hearing, which is planned for early next year.

The Justice Department has indicted Mr. Assange on a slew of charges including 17 counts of violating the Espionage Act, accusing him of the solicitation, acquisition, and publication of classified information from the former army intelligence analyst Chelsea Manning.

The charges raised questions about press freedom, and critics have expressed concern that the case could set a precedent to criminalize future acts of national security journalism.