LEXINGTON, S.C. (AP) - A 39-year-old man is sentenced to life in prison for shooting his wife twice in the head, near her 10-year-old daughter.

Solicitor Rick Hubbard says Sean Peters pleaded guilty to murder Friday for the December 2015 death of Rachel Peters.

Hubbard says the couple separated a month earlier, and Rick Hubbard was under court order to stay away from his wife and her two daughters from a previous marriage.

But he broke into their home while Rachel Peters and her youngest daughter were sleeping and held both at gunpoint before shooting his wife. An autopsy showed the gun was held directly against her head.

Sean Peters called 911 but refused to send the girl outside to officers.

Hubbard says her quick thinking in distracting Peters led to his arrest.