A five-year-old girl who was the subject of an Amber Alert north of Toronto on Tuesday was found safe after a few hours.

York regional police said the girl’s father was taken into custody but they do not know if he has committed a criminal offence as the investigation continues.

Police had issued the alert Tuesday afternoon after the girl was allegedly taken from her classroom in Markham, Ont., by her father.

Story continues below advertisement

They said he was not supposed to have access to his daughter and investigators received some information that caused concern.

“The child was reported missing, we knew that the father came to pick her up, we had information that he was not supposed to have access to her at that time, so we were essentially dealing with it to make sure that we found her and we could find out that she was safe,” police spokeswoman Const. Laura Nicolle said.

“Certainly it was a very big concern for us to find her quickly and we’re very, very relieved, obviously, to find out that she’s safe.”

Police said the pair was picked up by a minivan cab and dropped off at a second location, where they got into another vehicle.

Nicolle said the two were found just before 6 p.m. near the second location, after someone saw them in a business and recognized them from photos shared through the Amber Alert.

She said police had been scouring the area with helicopters, canine units and patrols in search of the pair.