(The Hill) — A Pennsylvania state judge on Monday ruled that an election worker cannot sue former President Trump over statements he made sowing doubt in the 2020 election results while in office, finding the statements are protected by presidential immunity.

 Philadelphia County Court of Common Pleas Judge Michael Erdos said Trump was immune for a tweet he issued and comments he made remotely from the White House during a Pennsylvania state Senate committee hearing in November 2020. The statements, made without evidence, claimed fraud in Pennsylvania’s election tabulations.

“Other legal proceedings may examine the propriety of his statements and actions while he was the President and whether, as the plaintiffs in this and other cases contend, it was this conduct which served as the actual threat to our democracy,” Erdos ruled. “But this case is not the proper place to do so. Here, Trump is entitled to Presidential immunity.”

James Savage, a Pennsylvania voting machine supervisor in the 2020 election, filed two lawsuits that have since been consolidated alleging that Trump, Rudy Giuliani, two poll watchers and others conspired to defame him. Savage says their statements led him to receive death threats and two heart attacks.

Erdos ruled Trump has immunity for the tweet and the remarks at the state Senate hearing because both statements were made while he was serving as president. But the lawsuit also contains claims over a letter Trump wrote to the House Jan. 6 committee last October, which Trump is not immune from as it was written after leaving office.

Erdos ruled the two earlier statements were part of Trump’s official duties, as he was speaking to the public on matters of public concern.

“Here, then-President Trump’s Gettysburg remarks and his tweet were public,” Erdos wrote. “Moreover, the topic of these statements—claims from third parties and the President himself about irregularities in the Presidential election which on their face called into question the integrity of the election and whether now-President Joseph Biden had been duly elected—was undoubtedly a matter of great public concern.”

Trump potentially faces a looming indictment in the Justice Department’s probe of the transfer of power following the 2020 election and the lead-up to the Jan. 6, 2021, Capitol riot. Trump has also faced several other civil lawsuits related to his unfounded claims of mass electoral fraud, in which he has similarly asserted immunity and remain tied up in other courts.

“We are pleased with the Court’s decision to honor the long-standing principle of Presidential Immunity,” Trump legal spokeswoman Alina Habba said in a statement.

“Today, the Court made it clear that it is well within the President’s discretion to address the integrity of our election without fear of liability,” Habba continued. “We expect that the rest of Mr. Savage’s claims will similarly be disposed of as they are without merit.”