A federal judge ruled in favor of BuzzFeed on Wednesday, bringing to a close a defamation lawsuit filed by a Russian technology executive over the website’s publication of a dossier containing unverified reports of connections between Donald J. Trump’s presidential campaign and the Russian government.

In her ruling, Judge Ursula Ungaro of the United States District Court in Miami, said that BuzzFeed was protected in its publication of the dossier by the fair report privilege, which gives news organizations latitude in reporting on official government proceedings.

“We are thrilled by today’s outcome, and thank Judge Ungaro for taking the time to consider this case on the merits,” Ben Smith, the editor in chief of BuzzFeed News, said in a statement.

The suit was filed by Aleksej Gubarev, the head of XBT, a company based in Luxembourg, and Webzilla, a Florida tech company. Mr. Gubarev and his companies were named toward the end of the dossier, which was compiled by the former British intelligence officer Christopher Steele during the 2016 campaign at the behest of Mr. Trump’s political rivals.