A 49-year-old Bronx man has been sentenced to 20 years to life in prison for lacing his children's pizza with rat poison after he discovered that his ex-wife was seeing another man.

Prosecutors say Leonardo Espinal was sentenced on Thursday after pleading guilty last month to the 2012 murder of his 5-year-old son and the attempted murder of his 7-year-old daughter.

Prosecutors say Espinal penned a suicide note and then fed his children the poisoned pizza. The daughter threw up and Espinal then locked himself and the little boy in the bathroom. When he refused to come out, Espinal's stepmother called 911.

Police knocked the door down and discovered Espinal dazed and the little boy dead in the tub from a combination of the poison and being submerged in water.