SNELLVILLE, Ga. (AP) — Authorities say a Georgia man was charged with second-degree murder Wednesday after his 8-month-old daughter died when she was left in a hot car while he was retrieving a gun from the police department and arrested.

Davied Japez McCorry Whatley, 20, went to the Snellville Police Department around 2:15 p.m. Tuesday to retrieve a gun that was held in the property department there, Snellville police Detective Jeff Manley said during a news conference Wednesday. Before releasing the weapon, police did a standard background check to make sure the gun wasn’t released to someone with a felony conviction.

Officers say they discovered that there was a warrant for Whatley’s arrest due to a probation violation and took him into custody. From the time Whatley arrived at the police department until he was turned over to the Gwinnett County jail — more than 40 minutes — he was recorded on police body camera and dashcam video.

“He made no statements as to the fact that his daughter was left in the car two buildings away from the Snellville Police Department,” Manley said.

Roughly seven hours later, the baby’s grandmother arrived at the emergency room with the child, who was determined to be dead. Officers then determined that the baby, Nova Grace Whatley-Trejo, had been left in the car outside City Hall and that her grandmother retrieved her from the car.

Georgia Bureau of Investigation Agent Lisa Vorrasi told reporters Whatley, who lives in Grayson, bonded out of jail on the probation violation charge Tuesday evening. He was arrested again Wednesday morning and charged with second-degree murder.

A second-degree murder charge in Georgia means that someone has caused a death while committing second-degree cruelty to children, regardless of intent. It carries a penalty of 10 to 30 years in prison.