A California man pleaded guilty Tuesday in 2nd District Court to breaking into his estranged wife's Layton home last fall, armed with a handgun and intending to shoot her.

Terry M. Dexter, 43, pleaded guilty to a charge of aggravated burglary, a first-degree felony that carries a prison term of five years to life, with a five-year firearm enhancement.Dexter admitted to breaking into the home of his estranged wife, Christine, on Oct. 9. Prosecutor Carvel Harward maintains Dexter intended to kill her. But in a statement Tuesday to Judge Rodney S. Page, Dexter said he intended to harm the woman but changed his mind once he got into the house.

Dexter was charged with aggravated burglary and aggravated assault after the incident. While being held in the Davis County Jail, he was charged with conspiracy to commit murder - also a first-degree felony - after detectives said he tried to arrange to have his former wife killed.

He was scheduled for trial Wednesday on the aggravated burglary and aggravated assault charges, with the conspiracy charge set for trial next week. Dexter changed his plea in a pre-trial hearing Tuesday, and Page scheduled sentencing for May 21.

In return for the guilty plea to the one first-degree felony count, the two other charges will be dismissed.

According to Harward, Dexter broke into the home the night of Oct. 9 by firing a shot from a .45 semi-automatic pistol through the home's rear sliding glass door. His estranged wife was in the process of divorcing Dexter, according to Harward, and had repeatedly told him he was not welcome at the home.

"In fact, she had told the defendant that if he came around the house, she would kill him," the prosecutor said.

A restraining order barring him from the home had expired and not been renewed because Christine believed Dexter had left the state and was living in California, Harward said.

After shooting out the window, Dexter came into the house and said, "Christine, I'm here to kill you," according to Harward. He chased her down a hallway and another shot was fired into the floor of her bedroom during the struggle, Harward said.

Meanwhile, one of Christine's sons from a previous marriage slipped out his bedroom window, ran next door and called the police.

A second son, armed with a kitchen knife, attacked Dexter, stabbing him twice and driving him out of the house, Harward said. During the struggle, Dexter tried to fire the gun a third time but it jammed, he said.

Dexter was found a few minutes later by police and arrested.

Defense attorney Steve Vanderlinden said Dexter admits he broke into the house but used the butt of the gun, not a bullet, to break the glass on the sliding door.

And he changed his mind about harming Christine, Vanderlinden said, and was trying to get out of the house during the struggle.