From Myanmar to Annapolis, reporters were harassed, arrested and even killed for doing their jobs. According to the Committee to Protect Journalists, 45 journalists were killed in 2018.

Reporters Without Borders put the figure slightly higher, saying more professional journalists were killed in connection with their work in the first nine months of 2018 than in all of 2017.

Conflict zones such as Afghanistan and Syria continue to be the deadliest places. But press-freedom groups warn of worsening conditions in places where a free press has been a pillar of civil society, including Mexico, parts of Europe and the United States.

“This has been one of the worst years of press freedom,” said Courtney Radsch, advocacy director for the Committee to Protect Journalists. “Over the past couple years, we’ve seen a deterioration in the environment in which people work, both in terms of people in prison and journalists killed.”

There are too many threats, arrests and killings to list, but here are three examples.

Set up in Myanmar

Reuters journalists Wa Lone and Kyaw Soe Oo started the year in prison. To the surprise and outrage of many, they will end it there as well.

The pair were arrested in December 2017 while investigating reports of a massacre of Rohingya, a Muslim minority in Myanmar. While they were reporting, a police officer invited them to meet up. As they were leaving the meeting, the reporters said, the officer handed them documents. Soon after, they were arrested.

Despite testimony from another police official that they were set up, a court found the two men guilty of violating Myanmar’s colonial-era Official Secrets Act and sentenced them to seven years in prison.

Foreign governments and human rights groups condemned the outcome, saying the trial and sentencing signaled trouble for democracy in Myanmar.“The clear flaws in this case raise serious concerns about rule of law and judicial independence in Myanmar,” the U.S. Embassy there said.

Shot in Annapolis

On June 28, a man burst into the Capital Gazette offices in Maryland’s capital and opened fire, killing five people.

The suspect, Jarrod Ramos, 38, had been harassing Gazette journalists since the paper ran a column noting that he was convicted of criminally harassing a woman. The harassment was so intense that the paper’s editor at the time, Tom Marquardt, wondered whether Ramos would attack. “I said during that time, ‘This guy is crazy enough to come in and blow us all away.’ ”

Ambushed in Afghanistan

The media scene that once thrived in post-Taliban Afghanistan is increasingly under attack.

On April 30, a suicide bomber riding a motorbike blew himself up in Kabul, not far from the U.S. Embassy. As journalists rushed to the scene, a second bomber, posing as a journalist, detonated his own device and killed 25 people, including nine reporters and photographers.

In a separate attack on the same day, Ahmad Shah, a BBC reporter, was fatally shot in Khost Province. “This is the deadliest day for Afghan media in the past 15 years,” Lotfullah Najafizada, the head of Afghanistan’s Tolo News TV, told the BBC.

He insisted that the violence would not break the resolve of the country’s journalists. “We went, all of us, to the blast site,” he said. “We said: ‘If you killed an entire line of journalists reporting here, in five hours time we’re back here; the line is longer; the queue is longer and the resolve is greater.’ ”