On Tuesday, President López Obrador defended his security strategy in the face of the drumbeat of violence, saying, “You cannot put out fire with fire.”

He said “there will be intelligence, which has been lacking, more than force,” and promised “prosecution, punishment.”

But Monday’s killings seem to have hit a new low, with infants, children and their mothers massacred in the road. It threatened to become a galvanizing moment for citizens frustrated with violence and the government’s efforts to stop it.

Image The burnt wreckage of a vehicle in northern Mexico that had been carrying members of the LeBarón family when they were attacked on Monday. Credit... Kenneth Miller/Lafe Langford J, via Reuters

President Trump offered on Tuesday to help Mexico eradicate the cartels, saying on Twitter that the Americans could “wage WAR on the drug cartels and wipe them off the face of the earth.”

He said that the United States was only waiting for a call from Mr. López Obrador, adding, “The cartels have become so large and powerful that you sometimes need an army to defeat an army!”

Mr. López Obrador said it was up to Mexico to deal with the matter. “We appreciate and thank very much President Trump and any foreign government that wants to help, but in these cases we have to act with independence,” he said.

Later Tuesday, a White House spokesman, Hogan Gidley, said the presidents had discussed violence and cooperation in the border region. Mr. Trump offered assistance “to ensure the perpetrators face justice,” Mr. Gidley said.

At least publicly, many details of the attack remained unclear Tuesday, as the state and local authorities struggled to piece together what happened and why.

At the heart of the mystery was motive. It was unknown whether the attackers deliberately targeted the family, which has historically spoken out about the criminal groups near the American border, or whether it was a case of mistaken identity.

Julian LeBarón, a cousin of the women who were driving, said that they and their children had been traveling from La Mora, in Sonora State, to Colonia LeBarón, in Chihuahua State.

One of his cousins, Rhonita LeBarón, was traveling to Phoenix to pick up her husband, who works in North Dakota and was returning to celebrate the couple’s anniversary. Her car broke down, Mr. LeBarón said, and the gunmen started shooting, causing the vehicle to explode.

He said she was killed with her four children: an 11-year-old boy, a 9-year-old girl and twins who were less than a year old.

About eight miles ahead, the two other cars were also attacked, and the two other women, Christina Langford and Dawna Langford, were killed. A 4-year-old boy and a 6-year-old girl were also killed, Mr. LeBarón said.

The children were taken to hospitals, and several or all of them were airlifted to the United States, David Langford said.

Family members expressed bewilderment over what could have precipitated the attack.

“They intentionally murdered those people,” Mr. LeBarón said. “We don’t know what their motives were.”

One of the women even got out of her car, he said, and put up her hands. “They shot her point blank in the chest,” he said.