DALLAS (AP) _ A second-grade teacher pleaded guilty Monday to strangling her two young sons after they opened their Christmas presents in an act of vengeance against her ex-husband.

Lisa Marie Smith was sentenced to life in prison after her plea, which averted a trial and possible death penalty. Smith, 31, will not be eligible for parole for 40 years.

She told police she killed William Cody Smith, 5, and Tristen Thomas Smith, 3, because she was distraught after losing custody of the boys to her former husband.

``I wanted him to know my pain, and how it felt to have his babies taken away from him,'' Smith told police after her arrest.

Police said Smith strangled the boys on Dec. 26, after they opened their Christmas presents. Two days later, she tried to kill herself by cutting her wrist and releasing natural gas into the house, starting a fire. It was after the fire that the boys' deaths were discovered.

Smith's ex-husband, Brit Smith, said Monday he was relieved there would be no trial. When asked whether he could forgive his ex-wife, he said tearfully, ``In the Bible it says I'm supposed to, but right now the hurt is not allowing me to do that.''