The attacker grabbed the 17-year-old as she walked in Bank Street, Irvine, at about 8.55pm yesterday, police said.
He pulled her into a wooded area where he sexually assaulted her, then ran off a short time later after a passer-by heard the girl shouting.
She was left extremely shaken by the attack.
Police Scotland appealed for information about the incident in the North Ayrshire town.
Detective Inspector Scott McClelland, of Saltcoats police office, said: "The area where this incident took place is usually busy with passing motorists and pedestrians, and I would urge anyone who witnessed anything that may assist this investigation to contact us.
"The suspect was last seen making his way into Patterson Avenue, Irvine, and anyone who saw him or recognises his description should contact police as a matter of urgency."
The attacker was about 20 and of Asian appearance with a very slim build.
He was wearing a long-sleeved navy blue coloured shirt, black dress trousers and black shoes. He spoke with a local accent.