“It is an undeniable fact that freedom of expression exists in Mexico,” the Mexican attorney general’s office said in a statement, noting that “the constant exercise of it has created risks and obstacles.”

Attacks on the media are fully investigated, and exhaustive measures are taken to protect journalists, it added, demonstrating the care “that the Mexican state is taking to uphold this right and oppose any threat against its free exercise.”

Not one of the hundreds of journalists under the government’s protection in recent years had been killed — until last summer, when a crime reporter with multiple threats on his life was shot dead on his front stoop.

But even the officials who run the protection program acknowledge that spending millions to keep journalists from being killed cannot solve the problem.

“We know this isn’t a situation we can fix one by one,” said Roberto Campa, the Interior Ministry’s deputy secretary for human rights. “The challenge of impunity is massive.”

The consequences for Mexico are far greater than a few more deaths in a country where 98 percent of murders go unsolved. In the eyes of many Mexican journalists, crime, corruption and indifference are killing the basic promise of a free press in Mexico — and with it a central pillar of the nation’s democracy.

“Freedom of expression here becomes a myth,” said Daniel Moreno, director general of Animal Político, an independent news organization in Mexico. Given “the fact that the authorities have proven they are incapable of solving most crimes against journalists, and are often the perpetrators of this violence themselves, then we can legitimately say that journalism is in a state of emergency in this country.”

After nearly a decade of growing violence against the media, whether from local officials or organized crime, the press has adapted by severely cutting back on what it reports. Self-censorship is not only common; it is often the standard.

Last month, when a respected reporter was fatally shot eight times while leaving her home, a newspaper she wrote for abruptly announced that it was shutting down, warning of the deadly landscape journalists were forced to inhabit.

“We fought against the tide, receiving attacks and punishments from individuals and governments for having exposed their bad practices and corrupt acts,” the editor of the newspaper, Norte, wrote in a front-page letter. “Everything in life has a beginning and an end, a price to pay,” he added, saying, “I am not ready for one more of my collaborators to pay for it and I am not either.”

President Enrique Peña Nieto, who rose to office vowing to push his nation past the drug war, has pledged to address the violence visited on the media.

But the federal government has consistently decided that crimes against journalists are not attacks on the freedom of expression, which means they do not warrant federal involvement. Federal investigators have reviewed 117 killings of journalists going back to 2000, but have chosen to pursue only eight. One has been solved.

Sometimes the government states, only hours after a journalist is found dead, that the killing had nothing to do with the person’s work, well before an investigation has even begun.

The nation’s supreme court rejected the government’s standard last month, writing that all crimes against journalists should go to the federal courts. But the ruling is not yet binding and may apply only to new crimes, meaning that scores of murder cases will stay where they are, in local courts, where resources are slim and vulnerability to corruption is high.

“In Veracruz, it’s easy to kill a journalist,” said Jorge Sánchez, whose father, Moisés, was murdered two years ago.

Moisés Sánchez published a newspaper, La Unión, for over a decade. But he waded into deadly territory, his family said, when he started writing stories about a local mayor pilfering money as the small town grew more dangerous.