VANCOUVER, Wash. -- A transient followed a female high school student all the way into her classroom Wednesday, before security guards responded and the suspect ran out of the building, police said.

The student first noticed the man following her across from the Columbia River High School parking lot. The stranger then managed to get inside the school without checking in, walked into the teen's classroom and sat down at a desk with a lit cigarette.

"He had a cigarette and it just stunk up the whole class and the teacher asked what he was doing," said Brylynn Marston, a student in the classroom. "And then he gave kind a of a creepy chuckle and then he just quickly left the room."

He was later identified by police as Pini Nou.

"Nou followed the student into her class and sat down at a desk, continuing to smoke the cigarette. The classroom teacher ordered Nou to leave immediately but he refused," said Sgt. Fred Neiman with the Clark County Sheriff's Office. "As security approached, Nou bolted from the classroom and was chased outside."

Outside, Nou pulled a ski mask over his face and became confrontational with security before fleeing again on foot, Neiman said.

Deputies responded and eventually found Nou hiding in the backyard of a home southeast of the school.

Neiman said Nou became combative and a struggle ensued. Deputies deployed a Taser to subdue the suspect and he was finally captured.

Nou was treated at the scene by paramedics and then taken in an ambulance to Legacy Salmon Creek Medical Center with minor injuries. He was released from the hospital and arrested Wednesday night for second-degree burglary.

No students or staff were hurt at the school. A district spokesperson told KGW some of the classrooms have outside doors which lead directly inside, but they have not yet determined how the stranger got in. They are also reviewing safety protocol at this time.

During the incident, students' parents were alerted with an automated phone call and an email.

“This afternoon an unknown male followed a female student into her classroom. The teacher asked the male to leave the classroom which he did. The young man was taken into custody by the Clark County Sheriff's department off campus, shortly after the incident was reported.”

Top headlines:

Cops shouldn't ticket cops: The get out of jail free card

Portland growth survey shows NIMBY attitude

Watch: 50 mph winds at the Oregon coast

Aloha homeowner fights off fugitive during police chase

Follow us on Facebook for the latest breaking news updates

Check news, weather & traffic wherever you are with the KGW News app