FORT EDWARD, N.Y. — The 22-year-old man who set his Hudson Falls home on fire, with his girlfriend locked inside an upstairs bedroom, admitted to her murder on Friday.

Derrick Guilder pleaded guilty to second-degree murder as part of a deal that will reduce his maximum prison sentence to 22 years to life in prison. The usual maximum on that charge is 25 to life.

Guilder admitted to the judge that in the early morning hours of September 6, he intentionally set a fire inside his Hudson Falls home as Ashley Coltrain slept in a second-floor bedroom. According to police, Guilder had locked the bedroom door to prevent Coltrain's escape.

In a hospital bed confession, Guilder told investigators that his actions were sparked by an argument with Coltrain about breaking off the couple's relationship. Guilder said he had originally planned to take his own life in the fire too, but thought better of it and escaped out of a second-floor window.

After the plea hearing Friday, district attorney Tony Jordan said the upcoming sentence should serve as a consolation for Coltrain's grieving family.

"They've been through a lot," he said, referencing the death of Coltrain's mother just a week before the murder. "For them, I thnk the closure this brings will give them great comfort — especially as we go into the Christmas season."

Guilder will be sentenced on January 12.