(CNN) -- A Phoenix man killed four people, including his wife and two children, in a shooting rampage that started as a domestic dispute over allegations of an affair, police said.
The suspect, Austin Smith, 30, returned home from a bar Thursday night and confronted his wife over accusations that she had cheated on him, which she denied, according to CNN affiliate KNXV.
He then killed his wife and two daughters at the family home and drove to the apartment of the man he believed she was having an affair with, said Sgt. Tommy Thompson of the Phoenix Police Department.
There, he fatally shot the man and injured two others, he said.
Police: One daughter survived
His wife, Dasia Patterson, 29, and their daughters Mayan Smith, 7, and Nasha Smith, 5, were found dead in the family's home, police said.
His 3-year-old daughter was hiding under a bed when police arrived and was not injured, Thompson said. The suspect told police that he chose not to kill her because she "reminded him of himself," the affiliate reported, citing court documents.
Police said the older daughter died of blunt force trauma, and the suspect told investigators that he allegedly killed her because she was crying.
Patterson's relatives said they are devastated and struggling to come to terms with the loss.
"We are in anguish over the senseless loss of our beloved Dasia and her young children," herfamily said in a statement.
"As we try to process our profound grief, our focus is on the welfare of her sole surviving 3-year-old daughter. She just lost her mother and sisters, and we want nothing more than for her to be with her family right now."
A second crime scene
After killing his family, Smith drove to an apartment complex in Phoenix and fatally shot Ron Freeman, 46, whom he accused of having an affair with his wife, police said.
In addition to Freeman, he allegedly shot two other people at the home -- a man and a woman -- who have not been identified. The woman, 47, is in critical condition while the man, 33, suffered serious injuries.
Police received a call about the shooting at the apartment and found the suspect's car fleeing the scene when they arrived, Thompson said.
"The car was stopped a short distance from the scene ... and the suspect, Austin Smith was taken into custody without incident," he added.
At the scene of the second shooting, one of the victims expressed concern for the suspect's family. When officers did a welfare check on the suspect's family, they found his deceased wife and two children.
During an interview with investigators at the Phoenix Police headquarters, the suspect said "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," Thompson said.
"He admitted to the crimes and said he believed his wife Dasia had cheated with Ron. Austin stated that God had told him to do the things he did," he said.
Smith was booked into the Maricopa County Jail and charged with four counts of first degree murder, two counts of attempted first degree murder and three counts of aggravated assault.
Information on his attorney was not immediately available.