Hours before six women and three children were killed, two rivals gangs had a shootout near the U.S. border.

Credit...Herika Martinez/Agence France-Presse — Getty Images

MEXICO CITY — The Mexican authorities said Wednesday that they were focusing their investigation into the massacre of nine members of a Mormon family on the possibility that it was related to a conflict between two criminal groups fighting for control of a region in northern Mexico.

Gen. Homero Mendoza Ruiz, Mexico’s chief of staff for national defense, said that before the family was attacked on Monday, the groups had a shootout in the town of Agua Prieta, on the border with the United States. At least one person died and another was wounded.

The authorities identified the groups as Los Salazar, based in the state of Sonora, and La Línea, based in the neighboring state of Chihuahua. After the gang shootout Monday morning, they said, La Línea dispatched gunmen to a region that straddles the two states to try to prevent their rivals from entering Chihuahua.

The attack on the Mormons as they drove through Sonora, General Mendoza said, “is being attributed to” this clash between the rival gangs. It remained unclear, however, whether the family was somehow involved in the rivalry or whether the attack was a case of mistaken identity.

The Suburbans that two of the victims were driving are commonly used in the area by criminal gangs, the general said.

The family members, all women and children, were ambushed while driving in three sport utility vehicles in a rural area of Sonora where Mormon groups who splintered from the main United States church began settling in the early 20th century.

Six children and three women were killed.

At two news conferences on Wednesday, Mexican government officials offered few new details about the attack and its motivations, saying that the investigation was still underway.

Elisabeth Malkin contributed reporting.