A Toronto high school was locked down for several hours on Friday after a student was pistol-whipped by another teenager inside a washroom.

The incident happened at George S. Henry Academy, located on Graydon Hall Drive near Don Mills Road and Highway 401, at about 9 a.m.

Const. Wendy Drummond said no shots were fired, but the 17-year-old victim was taken to hospital to be treated for non-life-threatening injuries.

Emergency Task Force officers went classroom to classroom searching for the 17-year-old suspect, who is a student at the school. He was considered armed and dangerous.

Officers didn't find the suspect in the school, and the lockdown ended in the early afternoon.

A nearby elementary school had also been under lockdown.

The suspect surrendered to police late Friday. The teen, who cannot be named under the Youth Criminal Justice Act, faces several firearm-related offences.

Drummond said it would take some time for investigators to speak with all of the witnesses. She wouldn't comment on a possible motive in the attack.