Ricardo Ainslie, a professor at the University of Texas at Austin’s College of Education, is the author of the forthcoming book “The Savior of Juarez: Life in the Heart of Mexico’s Drug War.”

For the first time in more than five years, Mexico is showing signs that its spasmodic violence is beginning to recede.

National statistics comparing January to May 2012 with the same period in 2011 indicate an 8 percent drop in homicides, the most troubling symptom of violence related to drug cartels. For a country buffeted by levels of brutality that climbed ever higher each successive year since Mexican President Felipe Calderón launched an offensive against the cartels in 2007, this is indeed welcome news.

The numbers are encouraging on the local level, too. Homicide rates in Tijuana, once a major site of drug-related violence, have fallen 42 percent from their peak in 2008 after federal forces dismantled and replaced the municipal police — greatly improving the city’s security situation. And Ciudad Juarez, long the epicenter of Mexico’s drug war and until recently regarded as the most violent city in the Americas — if not the world — experienced a stunning 60 percent decrease in the number of violent deaths in the first six months of 2012, compared with a year earlier. (More than 10,500 people have been killed in the city since the Sinaloa and Juarez cartels began battling each other in 2008 for control of the lucrative gateway into U.S. markets.)

In Juarez, too, local tax revenue was up for the first half of 2012, a sign that people are going out to restaurants and purchasing in stores. Building permits and real estate sales were also up, indicators that Mexico’s most brutalized city may have come through the worst of it.

The improvement in Juarez could have many causes: the purported victory of the Sinaloa cartel over its Juarez rival; the success of Mexican law enforcement strategies; the rebounding of the maquiladora (export assembly plant) industry, which had been eviscerated by the U.S. recession, leaving thousands unemployed; the unprecedented federal investment in the city’s social fabric begun in 2010; or, most likely, a mix of all those things. For ordinary citizens, what counts is the glimmer of hope that Juarez will again become a livable city.

To be sure, Mexico has a long way to go. Eight of the country’s 32 states continue to experience high levels of violence, with some areas effectively war zones. The state of Tamaulipas, for example, remains virtually ungovernable, with cities including Matamoros, Nuevo Laredo and Ciudad Victoria awash with drug-related executions and the grizzly narco PR campaigns that leave tortured and decapitated bodies in the midst of terrorized communities. Mexico’s government has deployed some 10,000 army and federal police in that state alone.

The improving national situation comes too late for Calderón, whose National Action Party (PAN) took a beating in last month’s elections. The vote was widely considered to be partly a referendum on Calderón’s drug-war strategy. Mexico’s apparent (pending court challenges) president-elect, Enrique Peña Nieto, has vowed to lower the country’s level of violence. Peña Nieto has, however, been vague on specifics and about how his strategy will differ from Calderón’s unpopular approach, which has relied heavily on the Mexican army and the federal police and has produced a wave of human rights complaints.

Through the first five years of Calderón’s presidency, he was unable to stem the violence around the country as cartels and their resident street gangs vied with one another for control of transnational routes and local markets. Ironically, if downward trends persist, Peña Nieto is likely to be pressed to continue Calderón’s policies by a public tired of the ravages of cartel violence — the same public that voiced its displeasure with those policies at the polls only a month ago.