The scream of an eight-year-old girl has scared away a would-be child abductor during an alleged attempted kidnapping outside a central Queensland hotel on Thursday afternoon, police said.

A 36-year-old man not known to the child was charged overnight, after the alleged incident was captured on CCTV and released to the public to help identify the man involved.

It will be alleged the eight-year-old girl was in a car which pulled into the rear carpark of the Emerald Hotel just before 5pm.

Security vision shows a woman and another child getting out and going inside. Moments later a man in a ute pulled up alongside the car.