The deaths of two toddlers who were left in a hot car by their mother as punishment have been ruled as homicides, after an autopsy revealed the children died from heatstroke.

Two-year-old Juliet Ramirez and one-year-old Cavanaugh Ramirez, of Weatherford, Texas, died in May after being locked in a hot car by their mother Cynthia Marie Randolph. Temperatures on the day were 35.5 degrees Celsius, according to police.

Randolf, 24, originally said her children locked themselves in the car, according to officials.

After leaving the children in the car, Randolf reportedly went inside her house and smoked marijuana and napped for two to three hours.

She later admitted that Juliet had refused to get out of the car and locked both of them inside the vehicle to teach them a lesson, believing they would let themselves out, according to an arrest statement.

The mother also admitted to breaking the car window to make the deaths looks like accidents.

An autopsy last week showed the children died from heatstroke. A medical examiner determined the deaths were homicides.

Randolph was arrested in June and charged with two counts of injury to a child causing serious bodily injury.

Parker county records show Randolph remains in jail.