FILE PHOTO - A police cordon reading "Danger" is pictured at a crime scene where unknown assailants gunned down people at a garage in Ciudad Juarez, Mexico, January 4, 2018. REUTERS/Jose Luis Gonzalez

MEXICO CITY (Reuters) - There were more than 25,000 murders across drug-ravaged Mexico in 2017, the highest annual tally since modern records began, government data showed.

Investigators opened 25,339 murder probes last year, up nearly 25 percent from the 2016 tally, interior ministry data released on Saturday showed. It was the highest annual total since the government began counting murders in 1997.

Mexico has struggled with years of violence as the government has battled vicious drug cartels that have increasingly splintered into smaller, more bloodthirsty, gangs.

Violence is a central issue in July’s presidential election. Mexican President Enrique Pena Nieto faces an uphill battle to keep his ruling Institutional Revolutionary Party in office.

There were 40 percent more murder investigations opened last year compared with 2013, Pena Nieto’s first full year in office.

Mexico on Thursday dismissed a claim by U.S. President Donald Trump that it was the most dangerous country in the world.