Hastings police are hunting a man who abducted a 12-year-old girl walking home from school yesterday and tried to remove her clothes.

The attacker took the girl to a house and then drove her to public toilets where he tried to undress her.

It was only a chance disturbance in the toilets that scared the man away, allowing the girl to escape.

Detective Andrew Sloan said the abduction was disturbing.

"Any such attack is obviously very worrying," he said.

"Who knows why they do what they do?"

The girl was abducted about 3.15 pm while walking along a main Hastings street, said Detective John Nicholls, of the Hastings police child abuse unit.

The man had been following her. He was aged 20 to 30 and driving a small red car.

"She was forced into the vehicle and taken to an unknown address where she was held for about three hours."

The girl escaped after being taken behind some women's toilets near the central city.

Detective Sloan said the man was a stranger to the girl and police feared he would attack again.

"Certainly, any incident like this causes us a lot of worry."

Police were in contact with schools but had not gone as far as warning parents, Detective Sloan said.

"At this stage we're just investigating the matter. We have had no other complaints of anything similar."

The girl had not been physically injured but was very upset.