(CNN) BuzzFeed News prevailed Wednesday in a long-running court challenge over its publication of the Russia dossier 10 days before President Donald Trump took office.

A federal judge ruled Wednesday that the news organization was protected in the court system from accusations of defamation because high-ranking government officials took action to vet the dossier and speak to Trump and then-President Barack Obama about it before it was made public.

In short, the dossier was newsworthy, the judge found.

"The press acts as the agent of the public, gathering and compiling diffuse information in the public domain. The press also provides the public with the information it needs to exercise oversight of the government and with information concerning the public welfare," wrote Judge Ursula Ungaro of the US District Court in Miami.

The case was one of one of the most serious court challenges following Buzzfeed's publication of the Russia dossier. Several others have filed lawsuits following its publication, but the BuzzFeed case, brought by a Russian tech entrepreneur living in Cyprus, had progressed furthest toward a trial.

Ungaro's ruling Wednesday closes the case against BuzzFeed at the trial-court level.

BuzzFeed editor-in-chief Ben Smith thanked the judge in a statement, championing her decision as a win for the First Amendment.

"When we published the Steele Dossier in 2017, we were met with outrage from many corners -- a major news anchor and President Trump both deemed it 'fake news'; and several Russian businessmen, plus Michael Cohen, sued for defamation," Smith said. "As we have said from the start, a document that had been circulating at the highest levels of government, under active investigation by the FBI, and briefed to two successive presidents, is clearly the subject of 'official action.' Moreover, its publication has contributed to the the American people's understanding of what is happening in their country and their government."

Val Gurvits, a lawyer for the Russian tech entrepreneur Aleksej Gubarev and his tech companies, said that his team would appeal the judge's decision to close the case.

"When we started this case, we knew that it would be a marathon and not a sprint," Gurvits said in an email. "We remain convinced that, after appeal, this matter will be presented to a jury and that we will succeed in vindicating the plaintiffs' good names."

Gurvits maintained on Wednesday that the judge didn't find that his clients, Gubarev and the companies, helped with the 2016 campaign hack. Gubarev and the companies -- Webzilla and XBT Holding -- have maintained they were wrongly named in the dossier as part of the Russian hacking effort. Following the dossier's publication, BuzzFeed redacted Gubarev's name in its version online and publicly apologized. The news organization never fully vetted the assertions that the dossier had made.

Dossier details revealed

The case had allowed BuzzFeed and Gubarev's attorneys to dig up new details from the federal government and conduct interviews with key players who have stayed nearly silent since the dossier's publication.

The individuals interviewed for this lawsuit and whose statements were shared with the judge included Christopher Steele, the ex-British spy who wrote the dossier, several BuzzFeed employees and David Kramer, the former diplomat who gave the dossier to a BuzzFeed reporter, and government officials.

The judge described in the ruling what both sides learned from the interviews and from evidence gathering for the case, including how several offices across the government such as late Arizona Republican Sen. John McCain's, House Speaker Paul Ryan's and the FBI got the dossier before BuzzFeed published the 35-page document on January 10, 2017.

The dossier was written as a series of 17 memos by Steele, after he was first hired through the research firm Fusion GPS by a Republican group and then by a law firm working for the Democrats. The groups sought opposition research on then-candidate Trump, and found through Steele's work some salacious yet still unproven claims.

Steele "took the information he found credible" about Trump and Russia's attempts in 2016 to support the candidate and potentially blackmail him, the judge wrote.

After sharing his research with the FBI in fall 2016, the FBI ended its relationship with the ex-spy because he had spoken with journalists. Still, an "independent unit within the FBI" tried to vet the dossier's claims, the judge said.

In November 2016, a former British ambassador to Russia who knew about what Steele had researched met McCain, his staffer Christopher Brose and Kramer, a former State Department official who worked alongside McCain, in Halifax.

At McCain's request, Kramer followed up with Steele, then received copies of the dossier from an owner of Fusion GPS.

Kramer then shared the dossier with McCain and the Senate staffer on November 30, 2016, and asked McCain to pass it to the FBI and CIA.

McCain also asked Kramer to meet with two US government officials, one from the State Department and one from the National Security Council, to see if the dossier "was being taken seriously." Those officials believed Steele to be credible, the judge wrote.

On December 9, McCain gave then-FBI Director James Comey 16 of the 17 Steele memos about Trump.

Steele passed the 17th memo, which mentioned Gubarev, to Kramer and several public employees. Those people included an unnamed senior British security official, the National Security Council representative, Illinois Republican Rep. Adam Kinzinger and House Speaker Paul Ryan's chief of staff John Burks. The FBI also obtained the 17th memo before BuzzFeed published it, the judge said.

BuzzFeed received its copies of the document on December 29, 2016, when reporter Ken Bensinger met with Kramer at the McCain institute. Kramer told the reporter some of Steele's findings weren't verified but "he took the allegations seriously," the judge said.

CNN broke the story of the FBI investigation into and the presidential briefings about the dossier on January 10, 2017. BuzzFeed then decided to make public the full version of the document, linking back to the CNN report.