Law enforcement officials say gunmen aboard a number of vehicles have staged attacks in several neighborhoods in the Mexican border city of Reynosa.

CIUDAD VICTORIA (AP) — The top prosecutor in Mexico’s border state of Tamaulipas said Tuesday that infighting between rival factions of the Gulf drug cartel was the motive behind a weekend shooting that killed 19 people, 15 of whom appeared to be innocent bystanders.

State prosecutor Irving Barrios told local station Radio Formula that apparently two gangs that operate just outside the border city of Reynosa launched the attack Saturday to weaken the rival Metros faction.

The Metros have long dominated Reynosa, across from McAllen, Texas. The area is a lucrative corridor for trafficking contraband and migrants across the U.S. border.

All three factions — the Metros, the Scorpions and the Cyclones — were part of the Gulf Cartel, but struggles for leadership and territory broke out after the arrest of drug lord Osiel Cárdenas Guillén in 2003, and the Gulf Cartel's split with their former henchmen, the Zetas, around 2010.

The Scorpions were once a specialized security force for cartel leaders; now they and the Cyclones operate their own smuggling, trafficking and extortion territory east of Reynosa, in Rio Bravo and Matamoros.

Barrios said trucks carrying gunmen from the Scorpions and Cyclones drove into Reynosa and opened fire “to destabilize Reynosa and gain territory there.”

He said their aim was “to create terror in a portion of the public so they could come in and take control.”

There is evidence that the groups of hitmen riding in a half-dozen pickup trucks sought to sow panic and also robbed people.

“They came firing left and right, everywhere,” Barrios said. “They robbed stores, they broke into an auto repair shop and stole cell phones and several vehicles, all with the goal of spreading terror.”

Four of the gunmen were killed in shootouts with police and National Guard members, and a fifth was wounded and is in custody.

Some Reynosa residents who spoke on condition of anonymity for fear of reprisals said many stores and restaurants were either closed or opening for only a few hours per day and shutting down by nightfall.

“There is a lot of uncertainty, because no one knows for sure what is happening,” said one Reynosa resident.

On Monday, federal prosecutors said they were taking over the case, and President Andrés Manuel López Obrador pledged “a thorough investigation.”

But the killings Saturday in Reynosa, and the latest nationwide homicide figures, suggest that López Obrador’s “hugs not bullets” crime strategy is doing little to decrease deaths.

There were 2,963 homicides in May, the latest month for which figures are available, higher than May 2020 and well above the numbers that prevailed when López Obrador took office in December 2018.

The government says homicides declined 2.9% in the first five months of 2021 compared to 2020, but that may be because January and February of this year were marked by Mexico’s worst coronavirus wave, when public activities were curtailed.

López Obrador has sought to avoid confrontations with drug cartels, at one point releasing a top trafficker to avoid bloodshed. He prefers to focus on addressing underlying social problems like youth unemployment.

Earlier this month, López Obrador praised the drug cartels for not disrupting the June 6 midterm voting, even though three dozen candidates were killed during the campaigns.

“People who belong to organized crime behaved very well, in general, there were few acts of violence by these groups,” the president said. “I think the white-collar criminals acted worse.”