A suspect facing murder and assault charges after a deadly shooting outside a courthouse in eastern Arizona was identified Wednesday as a 47-year-old grandfather involved in a custody fight over two children.

The suspect, Salomon Diaz of Snowflake, had been taking care of the kids for an extended time.

Investigators said he shot and killed the children's mother, 25-year-old Ashley Utley, and their grandmother, 45-year-old Sherry Quintero-Davenport, after encountering them outside the Navajo County courthouse in Holbrook Tuesday evening. The children's aunt was recovering at a hospital from a leg injury.

Local and state law enforcement officers were at the scene in less than a minute and Diaz was taken into custody. The shooting forced the building to be locked down while officers swept the complex to ensure the safety of workers and the public.

The court hearing didn’t go the way the suspect wanted and deputies said he went to his vehicle and retrieved a gun before opening fire and shooting the two women, AZ Family reported.

"We don't know his motive yet; we aren't in his mind," Navajo County spokesman Adam Wolfe said. "We do know the suspect was involved in the hearing, and for whatever reason, it led to him opening fire."

Wolfe said the attack was “personal, and not an attempt at a mass shooting,” the Arizona Republic added. 

"This is not common for this area at all," Wolfe said. "The area is family-oriented and very wholesome. When it first happened, we were all concerned for people's safety. Now we want to find out why. Anything like this will shake a community, but we will heal. That's what this community does."

Holbrook is roughly 90 miles east of Flagstaff.

The Associated Press contributed to this report.

Click for more from the Arizona Republic.