A federal judge weighing whether to unseal an apparent criminal charge against WikiLeaks publisher Julian Assange appeared unmoved Tuesday by arguments from a journalism watchdog group that the public has a right to know.

“Until a person is arrested, the government in my view has a compelling argument to keep the matter under seal,” U.S. District Court Judge Leonie Brinkema said at the end of the brief hearing in an Alexandria, Virginia federal court.

Brinkema added that “there are sound reasons why” criminal complaints and arrest warrants are typically under seal until a suspect is arrested — such as using the element of surprise to ensure the safety of arresting officers or agents — which she called a “legitimate basis.”

The revelation of the mystery case against Assange — a focus of years of investigation, according to sources — was because of a gaffe by a prosecutor working on a separate case with no connection to the WikiLeaks founder or the Russian counterintelligence case.

In court Tuesday, a Justice Department lawyer repeated the government’s position that it could not “confirm or deny” publicly whether Assange has indeed been charged for anything — or has even been investigated. But he also argued, either way, providing such confirmation would damage a hypothetical investigation.

“The only thing we’ve admitted is we made a mistake,” Assistant U.S. Attorney Gordon Kromberg told Brinkema, suggesting that details of such matters are best addressed in a judge’s private chambers.

Katie Townsend, a lawyer for the Reporters Committee for Freedom of the Press, which brought the lawsuit to unseal the case, said Assange’s advisers have long suspected there were secret charges against him for publishing U.S. government secrets.

“This confirms that speculation,” Townsend said.

Any reasons by law enforcement to keep the charge secret were rendered moot by the mistake of revealing his name in the unrelated case, she argued.

A prosecutor apparently used the Assange mystery matter as a legal template to write a motion to seal the case of a man accused in an unrelated sex crimes investigation. The prosecutor mistakenly failed to delete “Assange” in two places in his motion, which was noticed by an academic researcher earlier this month.

“At a minimum, Mr. Assange knows he’s been charged,” Townsend said.

Kromberg insisted that the Reporters Committee and other journalists who say they’ve spoken to confidential government sources who confirmed Assange has been secretly charged with an undisclosed crime were just “speculating.”

Brinkema said Townsend could have additional time to find a previous case of such a disclosure being made before an arrest, granting each side two weeks total to make further arguments before she issues a ruling.

In preparation for that hearing just outside Washington, Assange's lawyers attempted to visit him in the Ecuadorian Embassy in London over the weekend -- where he has been given political asylum since 2012 -- but they were denied entry, one of Assange's advisers in the U.K. told ABC News. He met with his lawyers on Monday.

Assange was made a citizen of Ecuador earlier a year ago but a change in government in Quito has resulted in pressure against him from President Lenin Moreno's administration, who wants stronger U.S. ties. From March to October,the world's most famous free speech asylee was denied visitors, phone calls and any internet access by the embassy, which installed spot cell jammers, WikiLeaks sources and a former top Ecuadorian diplomat have told ABC News. They blamed the denial of access on Assange’s tweets about the Salisbury nerve agent attack last spring in the U.K. but many sources said the Ecuadorian government is trying to force Assange out of their embassy.

In response to the Reporters Committee's motion to unseal charges against Assange, his attorney in Washington, Barry Pollack, last week told ABC News in a statement that the group "makes a compelling argument that the public has a right to know what the charges are now that the cat is three-quarters of the way out of the bag."

While arguing for the specific details of the ongoing unrelated case to remain sealed, the prosecution's motion to seal the complaint made mention of "Assange." Assistant U.S. Attorney Kellen Dwyer wrote that "no other procedure is likely to keep confidential the fact that Assange has been charged," referencing the WikiLeaks founder's last name again later in connection to possible evasion or avoidance of arrest and extradition in the matter.

Dwyer apparently failed to delete all references to Assange in the document about the unrelated case.

Sources close to WikiLeaks say the case may not be related to the probe by special counsel Robert Mueller into Russian interference in the 2016 U.S. presidential election but add that they do not know what the charges concern.

While U.S. officials have declined even anonymously to pull back the curtain on what Assange may have been charged with in Virginia -- where the CIA is headquartered, and where the agency's hacker files were stolen from and later published in 2017 by WikiLeaks as "Vault 7" -- one official told ABC News any charges against Assange are unlikely to be for activities defensible as journalism and protected by the First Amendment of the Constitution.

“It is inexplicable that the government would file in a public document a claim that Mr. Assange has been charged when no notice has been given to Mr. Assange. The government should not be bringing criminal charges against someone for publishing truthful information," Pollack told ABC News in a statement on Nov. 15.

The U.S. government has been investigating WikiLeaks for publishing military secrets and sensitive diplomatic cables since at least 2010.

New “protocols” by Ecuador as of October highlight what an increasingly unwelcome guest Assange has become, because even though he is once again receiving visitors he is forbidden from making political statements . His legal team says Ecuador's president wants political cover for eventually stripping Assange, whom Moreno calls a "hacker," of his Ecuadorian citizenship and asylum.

If Assange were to be expelled from the embassy, he could face immediate arrest by British police on an active warrant for "failure to appear" in court while out on bail in London, which is related to a now-closed rape inquiry in Sweden from more than six years ago.

That arrest could pave the way for his potential extradition to the United States, his lawyers have said.