A missing child from South Carolina is safe and the man accused of taking her from the home where her mother was found badly beaten is behind bars after a multi-state search.

Police arrested Thomas Evans after a police chase in Mississippi.

>> Read more trending news

The man's last hours on the run started when railroad workers spotted a car in the woods near train tracks  in Birmingham, Alabama, AL.com reported. Inside, Riverside, Alabama, police said they saw a little girl, later identified as Heidi Todd, awake and Evans asleep. When Evans woke up, he appeared nervous, and handed over Todd to Police Chief Rick Oliver, who told Evans they needed to go to the police station to talk. But Evans drove off, The Associated Press reported.

After a chase, police caught up with Evans just over the Mississippi state line, AL.com reported.

He was charged with kidnapping, Fox News reported.

Police said they have no motive as to why they said Evans took the child and there's no obvious connection between him and the girl's family, Fox News reported.

Heidi was checked out at an area hospital as she waited to be reunited with her father, AL.com reported

Officials believe Heidi was taken Tuesday and was discovered missing when her mother didn’t pick up the family’s other children from school. A friend went to their home and found Heidi’s mother beaten and reported the 4-year-old missing.

Heidi's mother was taken to a South Carolina hospital and was in "reasonably fair condition under the circumstances," AL.com reported.

The FBI had offered a $10,000 reward for information on Heidi's whereabouts, the AP reported.