The mother of the twin two-year-olds who died in a house fire in Batavia last year will spend the next year in jail for Endangering the Welfare of a Child.

Heather Ace, 24, admitted to police in October that she left the two boys at home for about an hour and a half to go buy Four Loko, visit a friend, send some Snapchats and buy $10 worth of marijuana.

Heather Ace, the mother of twins who died in #Batavia, NY fire, is sentenced https://t.co/Hn48NB1stL via @DandC — Jeffrey Arnold 🚒📷 (@firephoto25) May 23, 2017

While the boys, Michael and Micah Gard, were alone in the house, a fire broke out and both of them died.

Ace was charged with two counts of child endangerment, but she pleaded guilty to just one of them in February.

Judge Michael Cleveland called the case one of the most tragic he'd ever seen during Ace's sentencing on Monday, WIVB-TV reported. He said all Ace had to do was arrange for child care and her two boys could still be alive.

Ace's attorney pushed for probation so that Ace could see her other son, who is six years old, but Assistant District Attorney Melissa Cianfrini pushed for jail time because she said Ace kept changing her story.

Cianfrini does believe that Ace is remorseful, and officials do not suspect the mother of starting the fire. The cause of the blaze remains undetermined.