An Arizona man confessed to murdering his wife, two of his daughters and another man, after he suspected his spouse of having an affair.

Austin Smith, 30, of Phoenix, faces charges of four counts of first-degree murder, two counts of attempted first-degree murder and three counts of aggravated assault, after he killed his wife, Dasia Patterson, 29, two young children — identified as five-year-old Nasha Smith and seven-year-old Mayan Smith — and fatally shot Ron Freeman, 46, Thursday.

The police said Smith carried out the murders of three family members at his house before he drove to Freeman’s apartment complex. There, he shot and killed the man and wounded two others. As he was leaving the apartment, police officers responded to the scene and arrested him.

According to a probable cause-statement submitted to the court by Phoenix police, Smith confessed to his crimes during interrogation. After his wife returned from a local bar, Smith confronted him and accused her of having an affair. Initially, he believed that she was romantically involved with Freeman but said later that he suspected she was having an affair with his own brother, who was not named in the court records.

He also added he “shot her because he believed God told him to do so.”

"He said 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 adultery, extramarital affairs," said Phoenix Police Sergeant Tommy Thompson, Arizona Central reported

Next, Smith lay down Nasha on top of his wife’s body and shot her at the back of the head because he believed she had "exhibited bad behavior'' as well, against God's law. Mayan was killed because she was crying after witnessing her mother and sibling die.

"Austin believed you should not weep for the wicked, so he punched her in the face several times with a closed fist, threw her up into the ceiling, and threw her down to the floor several times," police said in the document.

Mayan died from an apparent blunt-force trauma, which could have been from being struck on her head several times with a baseball bat.

Smith’s youngest daughter, aged three, was found hiding uninjured under a bed at the family's home. Smith told the police that while his two older daughters reminded him of his wife, his youngest reminded him of himself. "It is my understanding that for whatever reason he elected not to shoot her," Thompson said.

A 9-mm handgun, a .45 caliber handgun and a .223 caliber rifle were found in the car that Smith was driving. Smith’s bail was set at $2 million.

Patterson’s family released the following statement regarding the incident: “They were the most beautiful, sweetest children in the world. We are in anguish over the senseless loss of our beloved Dasia and her young children As we try to process our profound grief, our focus is on the welfare of her sole surviving three-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.”