In 2017, Mexico became the deadliest country in the world for journalists, despite efforts by the government to crack down on violence against members of the press.

Five journalists have been killed in Mexico this year, according to an analysis by the Committee to Protect Journalists. In four cases, the motive for their slayings was confirmed to be directly tied to their work.

The latest victim was veteran reporter Javier Valdez Cardenas, who was shot and killed by masked gunmen on May 15 near the offices of Riodoce, the publication he had co-founded in 2003. Valdez, an award-winning crime reporter and author, told CPJ weeks before his death that he was concerned for his safety.

Another journalist, Miroslava Breach Velducea, was shot on the morning of March 23 as she was leaving her home. La Jornada newspaper reported that a note was found at the scene of the crime that read, “For being a loudmouth.” Breach was a crime reporter who covered connections between organized crime and local officials.

READ MORE: By murder, prison and rhetoric, here’s how the global free press is being suppressed

Crimes against journalists are not a new phenomenon in Mexico. By CPJ’s count, nearly 100 journalists have been slain in the country since the group started keeping track in 1992 – many for reasons related to their work. But the killings have been more frequent in recent years. Since 2010, roughly 50 journalists have been killed, with only a handful of cases leading to convictions.

To address the issue, the Mexican government has implemented several programs and laws over the past few years designed to keep journalists safe and punish those who commit the crimes. The problem is that very few of these programs actually get results, said Artur Romeu, communication coordinator for the press freedom group Reporters Without Borders.

In 2012, the federal government launched a program called the Federal Mechanism for Protecting Human Rights Defenders and Journalists to offer protection to journalists whose lives are believed to be at risk. These services include equipping journalists with surveillance cameras, police escorts, patrols and portable panic buttons that notify authorities in the event of an attack.

But Romeu told the NewsHour that some of these services have been ineffective and insufficient. Many of the panic buttons don’t work, he said, and the police patrols and escorts can be burdensome.

“I didn’t want my home to be watched by escorts,” said journalist Carlos Omar Barranco, who had been offered protection under the program. “What journalist can move that way? Much of our job has to be done in discretion,” he said in Spanish.

In addition to the Federal Mechanism, the government created the Special Prosecutor’s Office for Crimes against Freedom of Expression (FEADLE) in 2006 to investigate crimes against journalists and bring those cases to court.

The issue, according to a recent Reporters Without Borders investigation, is that the program doesn’t have the necessary resources to fully ensure the safety of journalists.

The investigation found that FEADLE lacks the personnel, funding and “political will” to deal effectively with the cases it investigates. When it ultimately does take those cases to court, the organization said, “they are only too often rejected by the judge on the grounds of being legally flawed.”

Additionally, the Reporters Without Borders investigation determined that very few cases of crimes against journalists lead to convictions. In fact, the number is only about 10 percent, according to Edgar Corzo Sosa, the inspector general of Mexico’s National Human Rights Commission.

“The countless cases of corruption and collusion between police and judicial officials, which are especially visible at the local level, fuel the vicious cycle of impunity,” the investigation read.

In a meeting in early May with CPJ, Mexico’s Attorney General Raul Cervantes Andrade was quoted as saying that authorities were “looking to replace” then-prosecutor Ricardo Najera in response to the organization’s concerns that the federal prosecutor’s office was not successfully investigating crimes against press freedom.

The following week, the Mexican Attorney General’s Office said in a statement that attorney Ricardo Sanchez Perez del Pozo would be the new head of FEADLE.

“He will review each case currently under investigation, maintain permanent contact with all organizations of civil society and journalists, propitiating a permanent and transparent dialogue with society and reinforce coordination with authorities from the three levels of government,” the statement read.

FEADLE and the Federal Mechanism did not respond the NewsHour’s requests for comment.

The current conditions in Mexico also caused the recent death, metaphorically speaking, of an entire news organization. The Juarez news outlet Norte halted production after it announced last month that the crimes against journalists have made it too dangerous to continue to publish the news.

In a farewell address on Norte’s website and final newspaper, editor Oscar Cantu Murguia wrote that he decided to end production because “there are neither the guarantees nor the security to exercise critical, counterbalanced journalism.”

Tania Montalvo, the general editor of the news website Animal Politico, says it’s common practice in Mexico for authorities to pay news outlets large sums of money for advertising space. These payments can affect the independence of media groups since they’re often used to bribe news organizations and manipulate their editorial decision-making process, she said. For example, if officials dislike a story, they can threaten to stop buying ad space.

Montalvo said all major Mexican media organizations depend on government advertising.

“If they don’t receive funds from the government, basically they can’t operate,” she said. “So this has turned into a form of censorship.”

Her publication announced in 2013 that it would no longer accept the government’s payments for ad space. Animal Politico president Daniel Eilemberg told the Knight Center for Journalism in the Americas that the organization had opted to no longer accept payments from the government because “financial independence is the only way to obtain editorial independence.” The news organization now relies on other means for revenue, including advertising from the private sector.

With slayings and censorship on the rise in Mexico, some journalists have also decided to take action on their own to defend press freedom and themselves. According to Montalvo, some news organizations have implemented their own security measures to protect reporters from kidnappings and slayings, including traveling in groups when they go out on assignment.

Maintaining constant communication with fellow editors and reporters has become a necessary routine. If reporters are out in the field, they’re required to call their colleagues regularly to let them know they’re safe. If a journalist doesn’t call the newsroom at a time previously agreed upon, that’s usually cause for concern.

Journalists are also protesting censorship more publicly, through demonstrations and through social media.

“Being a journalist in Mexico is living in fear.”

“What we’re doing is denouncing the crimes and we’re organizing as a group,” said Jorge Carrasco, a reporter for the magazine Proceso. “We’re letting the world know what’s happening in Mexico. What happened with Javier Valdez, for example, it was a culmination of the rage and pain and terror we have in Mexico. Being a journalist in Mexico is living in fear.”

To quell some of the concerns of journalists, Mexican President Enrique Peña Nieto announced on May 4 a series of measures designed to improve the current conditions in the country, including efforts to combat impunity.

CPJ’s senior program coordinator for the Americas Carlos Lauria said he welcomed the president’s commitment to press freedom, but advised the government to follow through on the president’s promises.

“Any reforms that Mexico decides to carry out is going to be impossible if journalists continue to be killed with total impunity,” he told the NewsHour, suggesting that the Mexican government needs to put its full political weight toward the protection of journalists.