By Anna Giles

RIPON (CBS13) — Unbelievable video captured the moment a high school principal tried to take down a suspect on the run.

Students at Ripon High School watched from their classroom window as a man scaled the roof of a school building to escape police on Tuesday morning. Students were just about to go to lunch when chaos broke out.

READ MORE: Sacramento Judge Rejects US Bid To Send Refugee To Iraq In Terror Case

Video taken by a student shows alarm bells ringing nonstop as the school went on lockdown. The students quickly realized it was not a drill.

They watched the suspect pace around on the roof, then jump off. That’s when Principal Keith Rangel tried to take the suspect down and barely missed.

“I was stressed and I was nervous and I didn’t know what he was going to do or what he was planning on doing,” said Katie Martin, a Ripon High School student.

Martin and her friends said it’s a mystery how the suspect got up there.

“I think someone said he went between the two buildings and climbed up like that,” said Brandon Bretao.

READ MORE: City Of Davis Cancels Annual Fourth Of July Celebration Due To Public Health Risks

Credit: Ripon Police Department

Ripon police identified the stealthy suspect as 23-year-old Jordan Anderson. Officers said on Tuesday morning they were called to an Ace Hardware near the school for a generator theft in progress. That’s when they saw Anderson run away toward the high school as students were getting ready to go to lunch.

It set off a social media storm that made its way to parents.

“Originally the rumor was that the suspect had a gun,” said Kristie Martin, Katie Martin’s mom. “…Knowing how close the suspect was to our kids very frightening situation was a very frightening situation.”

Police tracked Anderson down at Ripon Elementary where he was threatening to harm himself with a wooden object. They were able to take him into custody without injury.

But it’s the brave action of their principal that students can’t stop talking about.

“He certainly earned a lot of respect from me because I didn’t really know him up until that point, but he learned a lot of respect from me and I thought it was pretty cool of him,” said Tildon Madeiras, a Ripon High School Student.

MORE NEWS: ‘Kill Me;’ Stunning BodyCam Video Of Danville Police Shooting Released; Officer Faces Charges In Prior Suspect Killing

Kristie Martin added, “He, in my eyes, is a total hero and we are so grateful to have principal Keith Rangel.”