MEXICO CITY - Mexico has this year registered its highest homicide total since modern record-keeping began, according to official data, dealing a fresh blow to President Enrique Pena Nieto's pledge to get gang violence under control with presidential elections due in 2018.

A total of 23,101 homicide investigations were opened in the first 11 months of this year, surpassing the 22,409 registered in all of 2011, figures published on Friday night by the Interior Ministry showed. The figures go back to 1997.

Pena Nieto took office in December 2012 pledging to tame the violence that escalated under his predecessor, Felipe Calderon. He managed to reduce the homicide tally during the first two years of his term, but since then it has risen steadily.

At 18.7 per 100,000 inhabitants, the 2017 Mexican homicide rate is still lower than it was in 2011, when it reached almost 19.4 per 100,000, the data showed. The rate has also held below levels reported in several other Latin American countries.

According to U.N. figures used in the World Bank's online database, Brazil and Colombia each had a homicide rate of 27 per 100,000, Venezuela 57, Honduras 64 and El Salvador 109 in 2015, the last year for which data are available.

The U.S. rate was 5 per 100,000.

Still, Pena Nieto's failure to contain the killings has damaged his credibility and hurt his centrist Institutional Revolutionary Party (PRI), which faces an uphill struggle to hold on to power in the July 2018 presidential election.

Amnesty for gangs

The current front-runner in the race, leftist Andres Manuel Lopez Obrador, has floated exploring an amnesty with criminal gangs to reduce the violence, without fleshing out the idea.

Mexican newspaper Reforma said Saturday that after a campaign stop in the central state of Hidalgo on Friday, Lopez Obrador again addressed the issue when asked whether talks aimed at stopping the violence could include criminal gangs.

"There can be dialogue with everyone. There needs to be dialogue and there needs to be a push to end the war and guarantee peace. Things can't go on as before," Reforma quoted Lopez Obrador as saying.

Such a strategy harbors risks for the former Mexico City mayor.

A poll this month showed that two-thirds of Mexicans reject offering an amnesty to members of criminal gangs in a bid to curb violence, with less than a quarter in favor.

Pena Nieto is barred by law from seeking re-election.