The attacker grabbed the 17-year-old as she walked in Bank Street, Irvine, at about 8.55pm on Thursday, 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.
Police Scotland have appealed for information about the incident in the North Ayrshire town.
Detective Inspector Scott McClelland, of Saltcoats police office, said: "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 is about 20 and of Asian appearance with a very slim build. He was wearing a long-sleeved navy blue-coloured shirt and black trousers. He spoke with a local accent.