Even in a country long-used to violence, the cowardly 2017 murder of the Mexican journalist Javier Valdez prompted outrage: reporters held protests, news outlets stopped publishing for a day and the then president, Enrique Peña Nieto, promised that the crime would not go unpunished.

But barely 10 days after Valdez was pulled from his car and shot dead, his widow Griselda Triana was targeted for surveillance with spyware which had been purchased by the Mexican government.

The internet watchdog group Citizen Lab revealed on Wednesday that Triana received two text messages with deceptive links to software which would have infected her smartphone if downloaded and installed.

The day after the murder, similar links were sent to two of her late husband’s colleagues at the newspaper Riodoce, a weekly Valdez co-founded in the Pacific coast state of Sinaloa – heartland of the eponymously named drug cartel.

Previous investigations by Citizen Lab researchers at the University of Toronto have revealed that such spyware was used against Mexican anti-corruption crusaders, journalists investigating the president, and activists pushing for a soda tax.

But the revelation that it was also used in an attempt to spy on Triana has triggered a fresh wave of fury over Mexican authorities’ failure to stem violence against the press in the most dangerous country in the hemisphere for media workers.

It also reminded Mexicans that previous administrations have appeared to put as much of a priority on monitoring and pressuring journalists and activists as they did on fighting crime.

“It’s shocking and outrageous that there have been attempts to spy on Griselda Triana, a grieving widow, just 10 days after her husband was murdered in cold blood,” said Jan-Albert Hootsen, Mexican representative for the Committee to Protect Journalists.

“These attempts to spy on Griselda occurred several days after Peña Nieto called for an emergency meeting to discuss steps to ostensibly protect Mexican journalists.”

Triana is the 25th person in Mexico found to have been targeted with Pegasus spy software, made by Israel-based NSO Group.

Citizen Lab said that although it is not possible to determine the exact source of the attacks, its investigation points to a group linked to the Mexican government.

“The cases make it clear that NSO’s technology is abuse-prone,” said John Scott-Railton, senior researcher at the Citizen Lab at the Munk School at the University of Toronto. “It should be deeply troubling to anyone who is concerned about unaccountable official behavior.”

Peña Nieto left office on 30 November with historically low approval ratings amid soaring crime, official corruption and attempts to stifle press criticism.

His successor, President Andrés Manuel López Obrador, promised to stop government spying and announced plans to open the government archives. He also promised to respect press freedom, though he publicly chastises coverage he considers unfavourable.

A report from the Iteso university in Guadalajara published last week found a coordinated online effort to harass journalists and media outlets who criticise the president. López Obrador’s spokesman denied the allegations and said people were free to express their opinions.

Four journalists have been murdered since López Obrador’s inauguration on 1 December.