ROCK HILL, S.C. (AP) — Authorities say they will not charge the father of a 2-year-old boy who died after walking out of his South Carolina home and locking himself in a hot car.

Rock Hill police said when officers arrived around 4:40 p.m. Sunday, Lamartray Adams Jr.'s father was running toward them with the boy in his arms. The child died a short time later at the hospital.

Police say the father and neighbors found the boy unconscious in the car. Investigators say it appears the child walked outside, got into the car and the door locked behind him.

The National Weather Service says the temperature in Rock Hill was around 90 degrees.

Police said in a statement they consider the death "a terrible accident" and after consulting with prosecutors will not file charges.