A former Pennsylvania State Police Trooper has pled guilty to the deaths of his wife and unborn child in 2014, which he claimed was accidental

Former Pennsylvania Officer Pleads Guilty to Death of Pregnant Wife After Claiming He Shot Her by Accident

A former Pennsylvania State Police Trooper has pled guilty to the deaths of his wife and unborn child in 2014, which he claimed was accidental.

Joseph Paul Miller pled guilty on Thursday to two counts of involuntary manslaughter for causing the deaths of his wife, JoAnna Miller, and the baby girl she was pregnant with at the time, while he was cleaning his gun, according to the Associated Press.

Get push notifications with news, features and more.

Miller’s wife was taken to the hospital in critical condition while she was given an emergency cesarean section, according to the Montgomery Colonial. She was given an emergency cesarean, but the 24-week-old baby and the mother died after surgery.

Miller, 36, faces a maximum of 5 to 10 years in prison when he is sentenced in the coming months, according to CBS Philadelphia.

• Want to keep up with the latest crime coverage? Click here to get breaking crime news, ongoing trial coverage and details of intriguing unsolved cases in the True Crime Newsletter.

Miller told investigators he had been taking apart a gun he owned in the family room to clean it when it discharged, according to the AP.

He initially said the gun was about 10 feet away from his wife when it accidentally went off, but he later revised that distance to about 2 feet away. Prosecutors, however, said ballistics and forensics tests showed the gun was only 3 to 6 inches from his wife’s head when it fired, and they charged him.

In a 911 call he said: “I, ah, was cleaning. I was about to clean my gun, and I didn’t realize there was a round … I shot my wife.” Miller’s children can also be heard in the background of the call, reports CBS Philadelphia.

• PEOPLE’s special edition True Crime Stories: 35 Real Cases That Inspired the Show Law & Order is on sale now.

Miller’s defense attorney Tim Woodward told the AP that Miller had resigned from the state police.