WASHINGTON — The Justice Department alarmed voting-law experts Thursday by announcing an investigation into nine discarded ballots found in northeastern Pennsylvania, a case immediately seized upon by the Trump campaign as evidence of a dark Democratic conspiracy to tamper with the presidential election.

President Donald Trump also appeared to cite the case, telling reporters at the White House that ballots had been found “in a wastepaper basket in some location.… We want to make sure that the election is honest, and I’m not sure that it can be.”

The president’s comments marked his latest attempt to stoke uncertainty and alarm about the legitimacy of the coming election.

Trump appeared to be referring to a statement by David Freed, the U.S. attorney for the Middle District of Pennsylvania, saying that he was overseeing an investigation into nine discarded military mail ballots in the Wilkes-Barre area.

Freed said the Luzerne County district attorney requested an FBI investigation into reports of problems with a small number of mail ballots.

“At this point we can confirm that a small number of military ballots were discarded. … Of the nine ballots that were discarded and then recovered, seven were cast for presidential candidate Donald Trump. Two of the discarded ballots had been resealed inside their appropriate envelopes by Luzerne elections staff prior to recovery by the FBI and the contents of those two ballots are unknown.”

Before the U.S. attorney’s statement, White House spokesperson Kayleigh McEnany told reporters that there would be an announcement about the case. “I can confirm for you that Trump ballots, ballots for the president, were found in Pennsylvania and I believe you should be getting more information on that shortly,” she said.

When Freed first announced the case, he had said that all nine were cast for Trump. He said agents are still investigating the circumstances.

Later in the day, Freed issued a revised statement lowering the number of Trump ballots recovered — and the original was removed from the Justice Department’s website.

A statement by the local district attorney earlier in the week expressed confidence the investigation would be “successfully resolved so it will not have an impact on the integrity of the election process,” a degree of assurance absent from the U.S. attorney’s announcement.

A spokesperson the U.S. attorney declined to comment beyond Freed’s written statement.

But a letter Freed’s office released late Thursday, addressed to Luzerne County officials, offered a more detailed explanation of the FBI investigation and what agents had discovered.

The envelopes containing the nine ballots had all been improperly opened by county elections staff, it said. Six of the ballots appear to have been removed and thrown away, where they were later recovered from a dumpster outside the elections office. Three others, recovered by the staff, were linked back to their enclosing envelopes.

None of those envelopes should have been opened in the first place, Freed said, citing laws that prohibit the counting of mail ballots until 7 a.m. Election Day. County officials should have stored them securely, unopened, until canvassing began.

Instead, Luzerne County elections staff said that they opened nearly all envelopes as soon as they received them, according to Freed’s letter. He said they reported having difficulty telling the envelopes for requesting military or absentee ballots apart from those that actually contained filled-out ballots, and opened them both for fear of missing a ballot request. The same problems had plagued the office during the primary election, Freed said.

“The preliminary findings of this inquiry are troubling and the Luzerne County Bureau of Elections must comply with all applicable state and federal election laws and guidance to ensure that all votes — regardless of party — are counted to ensure an accurate election count,” he wrote. “Even though your staff has made some attempts to reconstitute certain of the improperly opened ballots, there is no guarantee that any of these votes will be counted.”

Still, despite the more complete explanation Freed offered the public by the end of the day, election law experts were stunned that the Justice Department had publicly disclosed the investigation before investigators had come to any firm conclusions.

"It's wildly improper, and it's truly unconscionable," said Justin Levitt, a former Justice Department official who is now a professor at Loyola Law School in Los Angeles.

Levitt said that the investigation itself is worthwhile, but that it was a baldly political move to announce the probe with partial facts — which officials then had to scramble to correct — while describing which candidate was selected on the ballots.

"That is the tell, and it says this was not an act of law enforcement, this was a campaign act, and it should mean the end of the career of whoever approved the statement," said Levitt.

Richard Hasen, an election law professor at the University of California, Irvine, said he could not recall ever seeing such an announcement.

"The Justice Department should not be a political tool, and this is a story that is going to be manipulated by the president to say his votes are being thrown out," Hasen said.

Soon after the U.S. attorney's statement was issued, the Trump campaign cited the case as evidence "Democrats are trying to steal the election."

Earlier in the day, FBI Director Christopher Wray tried to reassure a Senate committee that while there are occasional instances of small-scale, local ballot fraud, the United States has not experienced an instance of widespread voter fraud by mail.

“We have not seen historically any kind of coordinated national voter fraud effort in a major election, whether it’s by mail or otherwise,” Wray said, though he added fraud has been detected “at the local level from time to time.”

Changing the outcome of a federal election “would be a major challenge for an adversary,” he said, adding that the FBI “would investigate seriously” if it saw indications of such an effort.

Staff writer Jeremy Roebuck contributed to this article.