An Arizona man is accused of killing four people, including his wife and two of their children, and injuring two others Thursday in what police said began as a domestic dispute after he accused his wife of having an affair.

The 30-year-old suspect murdered his wife, 29, and two daughters, ages 7 and 5, at their Phoenix home, Sgt. Tommy Thompson of the city's police force said at a news conference Friday.

Police later in a statement said that Austin Smith had been booked in jail on four counts of first-degree murder, two counts of attempted first-degree murder and three counts of aggravated assault.

Smith's wife, Dasia Patterson, 29, and their daughters Mayan Smith, 7, and Nasha Smith, 5, were found dead at the family’s home, police said.

Smith chose not to kill his 3-year-old daughter, who was found by police hiding under a bed and was not injured, Thompson said.

Smith allegedly returned home from a bar Thursday night and confronted his wife over his belief she was cheating on him. She denied the allegations before Smith shot her and killed the children, police said in a probable cause statement.

This undated booking photo from the Maricopa County Sheriff's Office shows Austin Smith. Maricopa County Sheriff's Office via AP

Police said that Patterson and Nasha were found dead from gunshot wounds, and Mayan was found dead from what is believed to be blunt force trauma.

Police said that after killing members of his family, Smith drove to an apartment complex in Phoenix where he fatally shot a 46-year-old man after confronting him over a belief that someone had been having an affair with his wife.

The suspect told officers during an interview "that the reason he shot these individuals is because in God's eyes, it was all right for him to deal with someone in this manner who had been involved in an extramarital affair," Thompson said.

Police said Ron Freeman, 46, was killed at the apartment.

Freeman told Smith he was crazy and Smith shot him multiple times with a handgun, then reloaded and shot him while he was on the ground, the probable cause statement says.

Smith then allegedly went back to the car and got a .223-caliber rifle and saw other people helping the man he had shot, and he then shot at them with the rifle, according to the document.

Two other people, a man and a woman who have not been identified, were also shot at the apartment where Freeman was killed. The woman, who is related to Freeman, was hospitalized in critical condition.

Police were alerted to the murders around 8:15 p.m. Thursday when they received a call about a shooting at the apartment complex. When officers arrived, they saw a car they believed was being driven by the shooter leaving the scene.

The car was stopped, and Smith was taken into custody.

One of the injured victims told police they were worried about the suspect's family and asked officers to perform a welfare check, and it was at the family's home that officers found the bodies of the suspect's wife and their two daughters, and the 3-year-old who was alive, police said.

Thompson said it is tough emotionally for investigators when young children are the victims.

"Anytime we deal with small children, or children for that matter, it's an added burden," Thompson said.

A judge Friday set a cash-only bond of $2 million for Smith.