NAMPA -- A Meridian man accused of gunning down another man at the home of his estranged wife Friday night told officers he "lost it" after learning the woman was cheating on him, according to court documents.

Phillip Eddie Cabrera, 38, is facing felony charges of first-degree murder, aggravated assault on an officer and discharging a firearm into a dwelling. If convicted of the most serious charge, he could face up to life in prison or the death penalty.

The man killed was identified Monday as 34-year-old Andrew Shepard of Caldwell.

Cabrera told officers he drank beer and snorted cocaine before driving over to his estranged wife's home on Bear Valley Drive with seven guns in his pickup. When he saw the victim's car outside the trailer, he parked and slashed all four of Shepard's tires with a knife, he said.

After cutting the tires, Cabrera said, he returned to his vehicle and retrieved his "favorite" guns - a .45 handgun and a AR-15.

Cabrera's estranged wife told police she had just put her children, ages 9 and 10 months, to bed when Cabrera began banging on the windows and doors of the home.

According to police, the woman called 911 at about 11:15 p.m. Friday, telling dispatchers the suspect was trying to get into her home.

MORE: Police: Meridian man charged with murder in Nampa shooting

The woman told dispatchers that Cabrera was carrying a gun, and trying all the windows of the home. Minutes later, according to court documents, Cabrera broke down the front door and got into the house.

Gunshots can be heard on the 911 call, along with the woman screaming and telling the suspect to get out, as well as Cabrera yelling 'you cheated on me.' Several more gunshots are then heard.

The first officer on scene, Officer Brian Jones, arrived to find the front door kicked in and Cabrera standing inside, according to police. Jones said he told the suspect to show his hands, Cabrera "smiled at him, pulled out a handgun, and pointed it at his (B. Jones') head," according to the probable cause affidavit.

Jones moved around the west side of the trailer called for immediate backup. From where he was standing, the officer could partly see into the living room, where Cabrera was kneeling on the floor. According to court documents, Cabrera saw Jones, stood up and fired three times in his direction out the front door.

The officer moved back to his patrol car for cover until other officers arrived. Police say Cabrera fired another shot out of the home as two other officers arrived.

Ultimately, Cabrera tossed his handgun and a magazine out the door before stepping out and surrendering to the officers, police say. According to court documents, he told the officers as he was being taken into custody that his wife had a relationship with another man, and he "lost it."

Nampa Police officers did not fire any rounds.

Officers found Shepard's body inside the house, lying on the floor of the bathroom in the master bedroom. Both the door to the bedroom and the bathroom had been broken down, police say.

Shepard had been shot in the head and the chest.

Cabrera's estranged wife and the children weren't hurt, police say.

The woman told officers she barricaded herself in the in the bathroom along with Shepard and her children after Cabrera forced his way into the house. She said the suspect kicked down two more doors to get to them.

According to the woman, Shepard was in the bathroom holding her infant daughter and a baseball bat when Cabrera fired a round at him. She said she grabbed her baby and the shooter ducked back out of the bathroom, then returned and shot Shepard again in the head.

During an interview with detectives, Cabrera admitted he shot shot Shepard once in the abdomen, then again in the head as the other man crumpled to the ground.

The suspect said he saw police lights outside and thought he was going to be "in a big shootout with the cops like on TV/movies," according to court documents. Cabrera said he fired rounds at the front door, but was not aiming at Jones or the other officers.

He said he considered taking his own life, but ultimately decided against it and surrendered to police.

Judge Robert Jackson ordered the suspect held without bond during a Monday afternoon arraignment. Cabrera was also ordered to have no contact with his estranged wife and her children.

Cabrera remains in the Canyon County Jail. He is due back in court May 11.