The girl was waiting for her parents to pick her up after school on Wednesday at Applecroft Public School, on Coles Avenue in Ajax, police said in a release.
A man in a car approached and asked the girl to get into his car, saying her mother had sent him to pick her up.
There was a female sitting in the passenger seat. The girl spoke to the male suspect, but refused to get in the vehicle.
The girl asked for the code word her parents had given her. When he failed to provide the code word, police said the girl ran back into the school.
She quickly found her parents and reported the incident to them.
Educate your children, police say
Police say the incident illustrates the importance of parents talking to kids about "stranger danger."
"Educate your children," said Dave Selby of the Durham Regional Police. "Make sure they understand who might pick them up, if Mom or Dad can't pick them up, and then a code word is a great idea as well."
Leslie Parrott launched a campaign called Stay Alert, Stay Safe, after she lost her 11-year-old daughter Alison who was lured to a park in 1986.
"The key message we always give is keep your antenna up, you know, it will help kids to trust their own instincts, so having that code word is a terrific idea."
Police say they are looking for a white man with a medium build and an unshaven face. He was wearing a grey hat, blue scarf and green jacket with red and black high-top sneakers.
They are also looking for a white female in her late teens or early 20s with long blonde hair, wearing a purple and pink hat.
The car is described as a small, blue-grey two-door sedan with a dent on the left side of the rear bumper.
Anyone with information is asked to contact police or Crime Stoppers.