(Reuters) - A U.S. judge on Tuesday dismissed a Democratic Party lawsuit arguing that the Russian government, President Donald Trump’s campaign and WikiLeaks carried out a conspiracy to influence the 2016 U.S. election.

FILE PHOTO: Democratic National Commitee (DNC) Chairman Tom Perez reacts to the results of the U.S. midterm elections as he speaks at a Democratic party election night rally in Washington, U.S. November 6, 2018. REUTERS/Jonathan Ernst/File Photo

U.S. District Judge John Koeltl in Manhattan said he could not hear the claims against Russia, which were the focus of the case, because of a legal doctrine called sovereign immunity that shields foreign governments from litigation in the United States.

“The remedies for hostile actions by foreign governments are state actions, including sanctions imposed by the executive and legislative branches of government,” Koeltl’s written opinion said.

Koeltl also said holding WikiLeaks and the Trump campaign liable for dissemination of hacked emails would infringe on the First Amendment of the U.S. Constitution. The Democratic National Committee’s computer systems were hacked during the campaign and WikiLeaks published party emails.

Trump said on Twitter that the ruling was “yet another total & complete ... vindication & exoneration” of him and his campaign, similar language he used in response to former Special Counsel Robert Mueller’s report on his investigation into Russian election interference.

Mueller here, in testimony to Congress last Wednesday, emphasized that he had not exonerated Trump and accused the president of not always being truthful, called his support for the 2016 release of stolen Democratic emails “problematic” and said Russia would again try to interfere in the 2020 U.S. elections.

A lawyer for the Democratic National Committee (DNC) did not immediately respond to a request for comment on Tuesday’s decision.

The DNC said in its lawsuit that top officials in Trump’s campaign conspired with the Russian government and its military spy agency to hurt Democratic presidential nominee Hillary Clinton and tilt the election to Trump. Moscow denies interfering in the election.

The lawsuit said that Trump’s campaign “gleefully welcomed Russia’s help” in the 2016 election and accuses it of being a “racketeering enterprise” that worked in tandem with Moscow.

“During the 2016 presidential campaign, Russia launched an all-out assault on our democracy and it found a willing and active partner in Donald Trump’s campaign,” DNC chair Tom Perez said at the time the lawsuit was filed. “This constituted an act of unprecedented treachery.”

The Mueller report released in April detailed numerous contacts between the Trump campaign and Russians but found insufficient evidence to establish a criminal conspiracy with Russia to sway the election.

The Trump campaign argued in court filings that Mueller’s report made clear that the DNC lawsuit was “frivolous” and that the DNC should be sanctioned for refusing to drop the case.

Koeltl denied the request, saying the case was “not so objectively unreasonable as to warrant the imposition of sanctions.”