A battle between rival drug cartel factions in Mexico’s northern Chihuahua state left at least 26 dead and injured, officials have confirmed, in the latest series of violent incidents that have sent the country’s murder rate soaring.

Chihuahua state officials say the shootout occurred in the hamlet of Las Vargas, deep in the rugged Sierra Madre mountains, where the illegal drugs business has deep roots in the local community and economy.

Details were scant, but experts say that the security situation in Chihuahua has deteriorated in recent months as criminal groups squabble over the remains of the empire once controlled by Sinaloa Cartel boss Joaquín “El Chapo” Guzmán.

The shootout was just the latest atrocity in a wave of violence extending the length of Mexico, which has sent the country’s homicide rate soaring to levels not seen in two decades. It came after a weekend attack in neighbouring Sinaloa, where a confrontation between accused cartel members and state security forces left 19 suspects dead and five police injured.

Mexico recorded 11,155 homicides over the first five months of 2017, according to federal crime statistics. May, meanwhile, was Mexico’s most murderous month since 1997, when the country started accumulating such statistics, with 2,186 homicides committed.

Analysts attribute the rising violence to a confluence of factors, including changing dynamics in the illegal drugs business. Mexican cartels are shifting focus in their smuggling operations to the US from marijuana to heroin, unleashing a wave of violence in the opium poppy-producing state of Guerrero that has left entire villages have emptied.

A federal strategy of capturing or killing cartel kingpins has also been blamed for feeding the violence as underlings and rivals fight over the spoils.

Analysts say that changes in state governments – as recently happened in both Chihuahua and Sinaloa – can also contribute to the bloodshed, as arrangements (formal or informal) between politicians and mafia bosses are overturned or renegotiated.

“The grip of the Sinaloa cartel in the north-west of Mexico is weakening significantly,” said Alejandro Hope, a security analyst.

“This is [also] about institutional weakness,” Hope said. “Sinaloa has 800 state police officers. Chihuahua doesn’t have enough cops to cover its rural areas.”

Mexico launched a militarized crackdown on drug cartels and organised crime in December 2006 when then-president Felipe Calderón sent soldiers into the streets and rough corners of the country. At first violence spiked, but appeared to be declining by late 2012, when president Enrique Peña Nieto took office and pursued a policy of changing perceptions of Mexico and speaking sparingly of the crackdown on crime.

The number of homicides counted during the first 54 months of the Peña Nieto administration, however, are 17.7% higher than during the same period of the Calderón presidency and could be higher – columnist Raymundo Riva Palacio wrote in the online publication Eje Central.

“The statistics during the present government could be even greater due to variables in measuring,” Riva Palacio wrote. “One of them is that if the murdered person is not identified, they’re not counted” in the official statistics.