SACRAMENTO, Calif. (AP) — The gunman who killed his three daughters, a chaperone who was supervising his visit with the children and himself in an Arden-Arcade church this week was in the United States illegally, immigration officials said Friday.

David Mora Rojas, 39, overstayed his visa after entering California from his native Mexico on Dec. 17, 2018, on a non-immigrant visitor visa, U.S. Immigration and Customs Enforcement spokeswoman Alethea Smock told The Associated Press.

She didn’t say when his visa expired. But because he overstayed his visa, ICE asked to be notified when he was released from jail last week after he was arrested in Merced County for assaulting a California Highway Patrol officer.

The Merced County Sheriff’s Office told the AP that under California’s so-called sanctuary state law, it does not notify immigration officials about in-custody people who are being released, and ICE was never notified. The 2017 state law restricts local law enforcement’s cooperation with federal officials except when immigrants are accused of very serious crimes.

The shootings at a church in the Sacramento area occurred Monday during a weekly supervised visitation Mora Rojas had with his daughters, ages 13, 10 and 9. Police have revealed no motive but the confirmation that he was in the country illegally provides a possible reason: Mora Rojas may have feared being deported and separated from his children.

Sacramento County Sheriff Scott Jones’ department has disclosed few details so far, including when and how Mora Rojas obtained a weapon and what type of firearm he had. The agency had no immediate comment Friday.

Mora Rojas was arrested Feb. 23 on charges of resisting arrest, battery on a police officer and driving under the influence. Five days later he opened fire inside The Church in Sacramento.

The weekly visitation was allowed under terms of a five-year restraining order obtained by Mora Rojas’ ex-girlfriend, who was the mother of the girls. The order said he had repeatedly threatened to kill her, scared their girls and said he would kill himself.

In a response to a court filing for the order, Mora Rojas said he had no guns. His ex-girlfriend also said she was not aware of him having firearms.

It is not clear whether Mora Rojas, also known as David Fidel Mora Rojas, faced a significant danger of being deported despite immigration officials’ interest after his arrest. Although ICE had asked to be notified of Mora Rojas’ release, immigration officials did not take any additional steps to deport him after he was released on bail.

Under Democratic President Joe Biden, immigration officials put their priority for deportation on people whom they deem threats to public safety or national security or who recently crossed the border. That’s a departure from the Trump administration, which sought anyone in the country illegally for deportation.