The United States’ ranking for press freedom declined last year, driven in part by Donald Trump’s attacks on the news media, which also triggered a decline in other democracies, an international media organization said Wednesday.

Reporters Without Borders, which compiles the World Press Freedom Index based on its assessment of the legal environment and government threats to journalists, ranked the United States 43rd out of 180 nations. It finished two spots lower than a year ago, ranking just behind Burkina Faso and just ahead of Comoros.

“The election of the 45th president of the United States set off a witchhunt against journalists,” the group said in an analysis of its data. “Donald Trump’s repeated diatribes against the Fourth Estate and its representatives — accusing them of being ‘among the most dishonest human beings on earth’ and of deliberately spreading ‘fake news’ — compromise a long U.S. tradition of defending freedom of expression.”

It added that Trump’s “hate speech” helped unleash attacks on the media “almost everywhere in the world,” including in countries with long democratic traditions, such as Britain, France and Italy.

Government officials have even applied direct political pressure on news organizations in places where it was rarely known, the Paris-based organization said. It cited Finland — ranked as the top nation for press freedom the past six years but third this year — for an incident last year in which Prime Minister Juha Sipila appeared to intervene with the country’s public broadcaster to suppress a story unfavorable to him.

Even in democracies, it said, “the overall trend is towards adoption of legislation and provisions that threaten the essential conditions for a free press,” such as government surveillance of journalists.

The annual index was formally presented Wednesday at an event sponsored by The Washington Post. It featured interviews and discussions with journalists from Canada, Turkey and Syria who have faced legal impediments or physical threats while reporting in their countries.

The top nations on the group’s list were all in Northern Europe: Norway, Sweden, Finland, Denmark and the Netherlands. The worst-ranked were notoriously oppressive regimes such as North Korea, Eritrea, Turkmenistan, Syria and China.

In addition to faulting Trump, the group continued its criticism of his predecessor, President Barack Obama. It noted: “It bears repeating that [Obama] left behind a flimsy legacy for press freedom and access to information. . . . The Obama administration waged a war on whistleblowers who leaked information about its activities, leading to the prosecution of more leakers than [every] previous administration combined.”

It also cited “an increase in prolonged searches” of journalists at border crossings by U.S. officials and travel bans on foreign journalists after they covered revolutionary groups.

The United States has ranked as high as 17th on the press-freedom list but has generally fallen over the past 15 years.

The group noted that at least 10 journalists, including Amy Goodman, host of the “Democracy Now!” program, were arrested and threatened with prosecution while covering the Dakota Access Pipeline protests. Five others were arrested in New York and Louisiana while covering Black Lives Matter protests.

In countries without a strong democratic history, such as Poland, Turkey and Hungary, an “authoritarian strongman model” has emerged, according to the organization.

“In sickening statements, draconian laws, conflicts of interest, and even the use of physical violence, democratic governments are trampling on” press freedoms, it said.