The death toll from a shooting attack on a drug rehabilitation center in Mexico has risen to 26, officials confirmed Thursday, making it the deadliest such attack in a decade.

Authorities in the city of Irapuato in Guanajuato state raised the death toll from 24 after two of the seven people injured in the attack died.

Members of the national guard walk near an unregistered drug rehabilitation center after a shooting in Irapuato, Mexico, Wednesday, July 1, 2020. (AP)

Police in Guanajuato state said Wednesday's attack occurred at a two-story house on the outskirts of Irapuato. The attackers shot every male at the rehab center, letting only the females go, they said.

Rosa Alba Santoyo, whose three sons were killed in the attack, said that up until a month or two ago, there had been a military post across the street from the center, but that for some reason it had been withdrawn. Mexico's army and national guard have been given a number of tasks in dealing with the coronavirus pandemic that may have required those troops.

Guanajuato, a prosperous industrial hub with foreign auto plants, has become the most violent state in Mexico because of a bloody turf battle there between the Jalisco New Generation Cartel and the Santa Rosa de Lima Cartel.

MEXICO CITY POLICE CHIEF INJURED IN ASSASSINATION ATTEMPT; 3 DEAD

President Andrés Manuel López Obrador said Thursday that "changes must be made to solve Guanajuato's problem, because the circumstances demand it."

"The problem was allowed to grow, it grew a lot and we have to see if there was some sort of cooperation, criminal conspiracy between the criminals and officials," López Obrador said.

There have been persistent reports that state authorities who once tolerated the Santa Rosa de Lima gang, turned in recent years to allow the Jalisco cartel to enter the state in hopes they would end the local gang's systematic extortion of businesses.

Santa Rosa has proved tougher than expected for Jalisco to crush, in part because Jalisco's rival, the Sinaloa Cartel, is suspected of contributing money and guns to Santa Rosa.

CLICK HERE TO GET THE FOX NEWS APP

Mexican drug gangs have killed suspected street-level dealers from rival gangs sheltering at such facilities in the past. It was one of the deadliest attacks on a rehab center since 19 people were killed in 2010 in Chihuahua city in northern Mexico. More than a dozen attacks on such facilities have occurred since then.

The Associated Press contributed to this report.