DEARBORN HEIGHTS, Mich. (AP) — A suburban Detroit man who spent 16 years in prison for killing his first wife pleaded guilty Wednesday in the slayings of his two daughters and two stepchildren and in the torture of his second wife.

Gregory Green, 50, admitted to the slayings in Dearborn Heights District Court right after he was ruled competent to stand trial.

“He wanted to get it over with,” defense attorney Charles Longstreet II told reporters.

Authorities say Green killed his daughters, Koi, 5, and Kaleigh, 4, last September by carbon monoxide poisoning by leaving them in a car with the engine running. He then fatally shot his stepchildren Chadney Allen, 19, and Kara Allen, 17, in front of their mother, Faith Green, his second wife.

Faith Green, 39, was slashed across her face with a box cutter, shot in the foot and tied up but survived the Sept. 21 attack. She also was the mother of Koi and Kaleigh and had twice filed for a divorce. A judge rejected a personal protection order for her in 2013.

Police say Gregory Green dialed 911 after the slayings and waited for officers to arrive.

Sentencing is scheduled for March 1 in Wayne County Circuit Court. Gregory Green has to serve two mandatory years in prison for using a firearm during a felony. A sentence agreement also calls for 45 to 100 years in prison. Green will be 97 before being eligible to apply for parole, according to the prosecutor’s office.

Faith Green and the father of Chadney and Kara Allen approved the plea deal, prosecutors said.

Green served 16 years in prison for the 1991 killing of his first wife, who was pregnant. He married Faith Green in 2010, two years after he left prison on his fifth request for parole.