Mexican army and federal police at a crime scene Feb. 7 after an organized crime shooting at the Villa Juarez neighborhood in Navolato, in the state of Sinaloa. (Fernando Brito/AFP/Getty Images)

MEXICO CITY — On Thursday night, Trump tweeted that “Mexico was just ranked the second deadliest country in the world, after only Syria. Drug trade largely the cause. We will BUILD THE WALL!”

The problem?

That claim is based on a report by the International Institute for Strategic Studies. And even they now say their numbers are wrong.

In May, the group claimed that Mexico's total homicide count last year of 23,000 deaths was surpassed only by Syria (50,000). But in a statement released Friday, the organization retracted its numbers, saying that there was a “methodological flaw" in their data.

“Our researchers are working to rectify this and we will share the results in due course," the group wrote.

That comes as no surprise to the Mexican government. At the time the study was released, the government pointed out that in Mexico, the homicide rate (deaths per 100,000 people), which is the usual way to rank deadly countries, was far below even other Latin American countries.

“Mexico is far from being one of the most violent countries in the world,” the Mexican government pointed out at the time, citing United Nations statistics, even though the latest figures were a few years old. The most recent U.N. stats put Mexico's homicide rate at about 20 per 100,000 people, far below several other Latin American countries, including Honduras, at 90 per 100,000 residents.

Several security experts in Mexico considered the think tank's original study a bit sensationalist. Alejandro Hope, a top security analyst here, described it as “idiotic.”

Mexico has undoubtedly been extremely violent over the past decade, with an estimated 200,000 dead in the drug war. And the number of killings has risen sharply in the past two years, approaching record highs. Mexican newspapers reported that May 2017 was deadlier than any month since such statistics started being tabulated — even bloodier than at the height of the drug war.

But the problem goes beyond how you count. When you reach the upper ranks of the world's most violent countries, torn by insurgencies and civil wars, the accuracy of statistics often goes out the window. War zones are notoriously difficult places to compile an accurate tally of deaths. How many people died last year in South Sudan's civil war? It's hard to know. During the peak years of the U.S. involvement in the Iraq War, the casualty estimates sometimes varied by hundreds of thousands of people.

Getting a straight answer is also hard given how politically delicate the homicide rate is. In countries such as Honduras and El Salvador, which have suffered severe gang violence for years, day-to-day fluctuations in the homicide rate get reported like football scores, a way of pinning success or failure on the countries' governments.

Mexico is highly bureaucratic but also keeps official information closely guarded. Corruption is rife and distrust of government runs high. Given all this, counting homicides is fraught. Different federal agencies have different statistics and homicides are broken down into different types.

One of the best recent studies on Mexican violence, by researchers at the University of San Diego, found that no other country in the Western Hemisphere has seen such a large increase in its homicide rate or in absolute number of homicides over the past two decades as Mexico.

No one can deny Mexico is plagued by terrible violence right now — regardless of their opinion on Trump's wall.

This post has been updated.

Read more:

Violence is soaring in the Mexican towns that feed America's heroin habit