Three suspects are in custody but York Regional Police are still searching for several others after an incident where officers opened fire on a stolen car.

Police received a report of a suspicious vehicle at about 4:30 a.m. on Highway 7 in the Markham area north of Toronto. The officers were able to identify the vehicle as being stolen from Mississauga. They approached the vehicle after the driver pulled into a parking lot.

Det. Steve Morrell told CTV.ca that the driver then gunned the engine and drove directly at the officers, which caused police to act.

"There was a discharge of a firearm, at which point the vehicle came to a halt," Morrell said. "The suspects immediately fled."

Four to six young men ran away on foot. Officers were able to apprehend one boy immediately. Two were arrested hours later.

No officers were hurt in the incident, Morrell said.

Nearby St. Patrick's Public School was closed as a precaution following the shooting.

One area resident said he was awakened by gunfire.

"I heard some arguing this morning around 3:30 a.m. from my apartment building and I opened a window and the next thing I heard was a gunshot," the man told CTV's Jim Junkin.

Police are searching streets south of Highway 7, west of Markham Road, east of McCowan Road and north of Milne Park, for two or three suspects.

The boys are between the ages of 16 and 18 and were wearing dark-coloured, puffy jackets with hoods and baggy pants.

"We're treating them as armed and dangerous. At least one was armed with a knife," Morrell said.

Police are advising people in the area to call 911 immediately if they spot anything suspicious, and to not approach any of the suspects.

With a report from CTV's Jim Junkin