A teenage boy sneaked into Andover High School after hours on Monday afternoon, assaulted a female student in the library and threatened to kill staff members with a knife, according to charges filed Monday night.

A nearby teacher quickly retrained the teen until authorities arrived. A weapon was not found.

The 17-year-old suspect, whose name was not released due to his age, is not a student at the school. It's unclear what provoked the attack.

He is being housed at the Lino Lakes Juvenile Detention Center, where he was charged with assault, disorderly conduct and trespassing.

Anoka County sheriff's deputies responded to an assault in progress at the school just after 4:30 p.m. Monday. Investigators say the teen got into the school via a secured door as another person was leaving.

He then headed toward the library, where he punched a female student in the head and kicked her several times, according to charges. A teacher who intervened to protect the girl was also head butted and kicked. During the attack, the juvenile "made mention of a knife and threatened to kill other teachers," said Lt. Andy Knotz, of the Sheriff's Office.

Paramedics treated the student victim and released her to a parent. The teacher was not injured.

Knotz said a motive was not apparent but that evidence suggests the assailant first had a confrontation with another individual outside the school before sneaking inside.

Andover High School has doors that automatically lock and security officers on-site. The case remains under investigation.

In an e-mail to parents on Monday, Principal Becky Brodeur wrote that school staff acted quickly to diffuse the situation, which she deemed "limited in scope."

She said that student safety remained a top priority at the high school, enrollment 1,750. Andover is about 22 miles north of Minneapolis.