(Press-Register/John David Mercer)Demetrius Thomas is led away from Mobile Police headquarters on Dec. 2, 2009. He shot to death his estranged girlfriend, Cindy Longmire. The couple had four children.

MOBILE, Alabama -- Demetrius Thomas, who killed his estranged girlfriend at her job helping the mentally disabled, pleaded guilty to 2 counts of capital murder today and now faces spending the rest of his life in prison.

The Mobile County District Attorney’s Office agreed to drop the death penalty against Thomas as part of a plea agreement and instead recommend life without parole.

Thomas, now 35, was increasingly distraught over his longtime girlfriend Cindy Longmire’s decision to end their relationship in 2009, and one day in December, he showed up at the Theodore group home where she worked as a caregiver to 3 mentally disabled residents.

The couple had 4 children, who were then ages 9, 10, 11 and 12.

Thomas fired a shot through a kitchen window as Longmire stood at the sink, crawled through the shattered window and fired 3 more shots at her once he was inside, according to the prosecution.

Assistant District Attorney Jo Beth Murphree said that as a police detective arrested him a couple of hours later, Thomas said “I just lost it.”

When asked why the prosecution made the plea agreement, Murphree indicated a concern for the couple’s children. She said she would have needed to call at least one of the children to the witness stand to build a strong case in front of a jury.

“There were 4 children who had just lost their mother to violence, and the defendant is their biological father,” Murphree said.

Defense attorney Art Powell agreed that concern for the children was a factor in the plea deal. He said the incident was also “totally out of character” for Thomas.

“The Demetrius Thomas that did what he did is not the Demetrius Thomas that I’ve gotten to know over the last few years,” Powell said. “He’s very remorseful,” his attorney said.

Under state law, a jury will still have to hear evidence and rule on whether Thomas is guilty. Powell said he expects the abbreviated proceeding to take only one day. The jury will be told about Thomas pleading guilty as part of the evidence.