A 12-year-old boy saved himself from a suspected kidnapper after he jumped out of the man's moving vehicle to escape, police in Florida said.

The child was treated for minor scrapes on his forehead, arms and hands. The suspect, 26-year-old Timothy H. Miller, was arrested and faces charges of kidnapping, resisting arrest with violence and child neglect, according to a probable cause affidavit.

The boy told police officers that he got off his school bus in Boynton Beach, Florida, on Wednesday and started walking when a man driving a white pickup truck stopped and offered him a ride. The man, later identified as Miller, told the child that he "gives kids rides all the time and not to worry because he won't do anything weird," according to the affidavit.

The boy said Miller "seemed nice and had a friendly smile" so he got in the truck, but started to get uncomfortable when Miller asked him if he had any drugs and looked at him "strangely," the affidavit states.

Timothy Miller. Boynton Beach Police Department

The child told police that he got scared and when he tried to open the passenger door to get out, Miller told him he couldn't leave and sped up. Police said the boy managed to get the door open and jumped out of the moving vehicle. He told authorities that he temporarily lost consciousness when his head struck the pavement.

Several people saw the child jump out of the car and stopped to help him. Another witness followed Miller's truck and blocked the vehicle in until police arrived. Miller, of West Palm Beach, violently resisted arrest, authorities said, but he was eventually taken into custody.

Police said Miller told detectives that he thought the boy was between 14 and 16 years old and picked him up because he wanted to buy drugs.

"We are grateful to the Good Samaritans who assisted us with taking Miller into custody, the Boynton Police Department said in a Facebook post. "We encourage parents to use this as an opportunity to remind their children about the dangers of getting into a car with someone they do not know."