Jolisa Renee Peterson, 22, appeared in court Friday on a charge of endangering a child.

Police were called after someone spotted the little girl trying to cross a busy intersection. The incident occurred in May.

The child told the responding officer she had walked to a nearby gas station twice that day to get a soda, according to court documents. She said she didn't go to school because her mom was "asleep with a boy." She said her mother told her to go outside to play, police said.

Police learned the girl lived more than half a mile from the gas station.

When they arrived at Peterson's apartment, she denied knowing that her daughter had left the apartment, police said. Officers pointed out that the door must have been locked from the inside because the child didn't have a key.

An apartment manager told officers she often saw the young girl and her 2-year-old brother unsupervised around the complex, according to court documents.

Police determined the young girl had to cross two feeder roads and go under a freeway overpass bridge to get to the gas station.