The FBI will assist the Mexican government in its investigation into a suspected cartel massacre of nine American women and children near the U.S. border last week as authorities appeared to be struggling to find which group is responsible, the agency told Fox News on Monday.

The FBI initially offered its help in the investigation two days after the attack, but at the time it was unclear whether Mexican authorities took the bureau up on the offer.

MEXICO CARTEL AMBUSH: AMERICAN FATHER WHOSE RELATIVES WERE KILLED SAYS HE'S LEAVING THE COUNTRY

"The FBI will be providing assistance at the invitation of the Mexican government with the investigation into the recent attack against American citizens," the agency said Monday. "The FBI remains committed to working alongside our international partners to help bring justice to the perpetrators of this heinous act of violence."

Mexico’s Foreign Ministry said it asked for the FBI's help on Sunday through a diplomatic note to the U.S. Embassy in Mexico, Reuters reported. The FBI agents would work alongside Mexican investigators and will be unarmed, it said in a statement.

The formal invitation comes a week after the brutal massacre of three mothers and six children in northern Mexico’s Sonora state.

The slaughter was carried out in broad daylight on a remote dirt road. The families’ three SUVs were sprayed with bullets. Photos of the grisly scene showed a burnt-out SUV riddled with bullet holes and a blood-stained car seat.

Shortly after the attack, the Mexican government suggested it may have been a case of mistaken identity and that the families weren’t the target of the attack.

MEXICAN MASSACRE SUSPECT ARRESTED AT BORDER NOT TIED TO ATTACK; CONFUSION OVER WHICH CARTEL WAS RESPONSIBLE

Family members have since disputed those claims, telling Fox News that it appeared to be a “direct attack.”

"We thought it might have been mistaken identity," said Daniel Lebaron, a cousin of Rhonita Maria Miller, a mother who was shot and burned to death along with four of her children. "Now we've had quite a bit of evidence that once the attack began, they continued it, knowing that there were women and children in the vehicles. So, as far as why it happened — we're not sure yet."

"But it definitely was not crossfire between cartels," he added. "This was a direct attack, apparently, from the one cartel."

President Trump had called on Mexico to wage “war” on the drug cartels following the attack. He also offered U.S. assistance should the Mexican government ask for it.

CLICK HERE FOR THE FOX NEWS APP

But Mexico's President Andrés Manuel López Obrador maintained that violence was not the answer or appropriate response to the growing deaths at the hands of cartels.

Lopez Obrador has faced mounting criticism for his government's policy of using "hugs, not bullets" approach to cartel violence.