(CNN) As he handed down his sentence, a Texas judge scolded a young mother whose two daughters died after she intentionally left them in a car overnight.

"People in our community take better care of their pets than you took care of your kids," Judge N. Keith Williams told Amanda Hawkins last week, according to the Hill Country Breaking News

More than a year after the death of her children , Williams on December 12 sentenced Hawkins, who turns 21 on Wednesday, to 40 years in prison, according to the Kerr County Clerk's Office.

Hawkins pleaded guilty earlier this year to child abandonment and endangerment and injury to a child, according to CNN affiliate Spectrum News San Antonio

"Those precious little girls would still be here today if this had not happened," the judge said during the sentencing, Hill County Breaking News reported.

In June 2017, Hawkins, then 19, left 1-year-old Brynn Hawkins and Addyson Overgard-Eddy, 2, in her car for more than 15 hours while she and a male friend hung out with friends inside a home, the Kerr County Sheriff's Office said.

The children were left in the vehicle from the night of June 6 until noon the next day, according to the sheriff's office.

"They were in the house all night. The male friend, for a little bit, went out, slept in the car a little while, but then went back in the house," Kerr County Sheriff W.R. Hierholzer told CNN affiliate KABB

People in the house reported hearing the children crying but nobody went to check, the sheriff told KABB.

Hawkins found the children unconscious in the car after temperatures reached into the 90s, KABB reported

Hawkins tried to bathe the unconscious children before a friend prompted her to take them to Peterson Regional Medical Center in Kerrville, according to CNN affiliate KSAT . Hawkins didn't immediately take the children to the hospital because she "did not want to get into trouble," the sheriff's office said.

When Hawkins and a 16-year-old male friend arrived at the hospital with the girls, they were found to be in "grave condition," the sheriff's office said.

Authorities became suspicious after Hawkins told hospital personnel she and the 16-year-old friend and the children has been at a nearby lake, where the girls smelled flowers before collapsing, according to authorities.

Her story quickly unraveled under questioning, authorities said.

"This is by far the most horrific case of child endangerment that I have seen in the 37 years that I have been in law enforcement," the sheriff said in a news release.