A Manhattan federal judge on Tuesday said he may unseal FBI affidavits seeking a search warrant for Hillary Clinton’s emails in the Anthony Weiner investigation, giving the government two days to argue why the materials that shook up the presidential election should stay secret.

U.S. District Judge P. Kevin Castel, acting on a suit filed by a lawyer who specializes in repatriating art looted by the Nazis, said the need for secrecy in an underlying sexting probe of Weiner did not justify continued sealing of materials related to FBI director James Comey’s dramatic October announcement on the email probe of Clinton.

“Director Comey described that as an unrelated investigation,” Castel told Justice Department lawyer Jennie Kneedler, advising her that in addition to arguments for keeping the Clinton materials secret by Thursday she should suggest redactions if he decides to unseal them.

After closing without charges last summer a lengthy probe of whether Clinton mishandled classified information through her private email server, Comey shook up the presidential race in late October by announcing that the FBI had come across Clinton emails in its probe of ex-Congressman Weiner’s possible sexting with a young girl.

The Weiner probe was being conducted by the office of Manhattan U.S. Attorney Preet Bharara, and the emails in question were reportedly contained on a laptop used by Weiner and his wife, Clinton aide Huma Abedin.

A few days before the election, Comey announced that the new emails had been reviewed and did not require reopening the Clinton email probe or change the conclusion that no charges were merited. But Clinton’s camp contends his October announcement was improper, and critically changed the trajectory of the presidential race toward Donald Trump.

Castel, who did not issue the warrant, said he knew “literally nothing” about the substance of the application. He ordered lawyers to notify Weiner, Abedin and Clinton and give them the opportunity to be heard as well, and said he wanted to act quickly.

E. Randol Schoenberg, the Los Angeles lawyer who filed the lawsuit, said he thought Comey’s announcement played a critical role in the outcome of the election, and it was important for the public to know what -- if any -- basis the FBI had for believing the emails were suspect.

“This whole very unusual process needs to be examined,” said Schoenberg, whose work in recovering stolen art was featured in the 2015 film “Woman in Gold” in which he was portrayed by Ryan Reynolds.

“The public has a right to a transparent process,” he said, “and if a mistake was made we have a right to find out and hold people accountable, and if someone improperly influenced the process we have a right to follow that and see where that path leads.”

Newsday and other news organizations covering federal court in Manhattan sought access to the same materials in late October in a letter filed with Chief Judge Colleen McMahon, who forwarded the letter to Bharara who never responded.