PORTLAND, Ore. — Police released the identity Saturday of an 18-year-old student who was tackled after reportedly bringing a gun into a classroom at an Oregon high school.

Angel Granados Dias had been booked into the Multnomah County Detention Center on suspicion of possessing a firearm in a public building, attempting to shoot a gun at a school and reckless endangerment, the Portland Police Bureau said.

He is a student at Parkrose High School, where he brought the shotgun Friday, authorities said. Witnesses told the Oregonian/OregonLive that he appeared distraught when he appeared at the door to their government class and pulled the weapon from beneath a long black trench coat, and that a football and track coach, who also works security at the school, Keanon Lowe, tackled him before anyone got hurt. Lowe is a former football standout at the University of Oregon.

It wasn’t immediately clear if Granados Dias had a lawyer. He was being held on $500,000 bail and was scheduled to appear in Multnomah County Circuit Court on Monday. There were no other suspects.

In a letter to families Friday evening, Parkrose School District Superintendent Michael Lopes Serrao said two students had informed a staff member of “concerning behavior” by the student who brought the gun. Security staff then responded, found him and quickly disarmed him, he said.

“Thanks to their heroic efforts all students and staff are safe,” Lopes Serrao wrote.

Lowe posted to Twitter on Saturday that he was thankful the students were safe, and that he hopes to be part of the solution to gun violence in schools.

“When confronted with the test the universe presented me with, I didn’t see any other choice but to act,” Lowe wrote. “Thank God, I passed. I’ve spent the last 24 hours being more appreciative of my family and realizing we have a serious problem.”

Police spokesman Sgt. Brad Yakots declined to confirm Lowe’s reported involvement.

Yakots said the first responding officers found the gunman being detained by the staff member in the hallway. A firearm was recovered at the school, he added.

Parkrose was evacuated, and a nearby middle school was on lockdown for several hours as the investigation unfolded. The high school students were bused to a nearby parking lot where they were reunited with their parents.

The outcome was “the best-case scenario, absolutely,” Yakots said. “The staff member did an excellent job by all accounts, [and] our officers arrived within minutes and went right in.”

The student didn’t point the gun at anyone, senior Alexa Pope said.

Students fled out the back door because the gunman was blocking the main doorway.

“As I was running, I was just like, ‘Lord don’t let this be it,’ ” Pope told the Oregonian/OregonLive.

Lowe began working at Parkrose last year as the school’s head football and track and field coach, according to his LinkedIn profile. Before that, he worked for his high school alma mater, Jesuit High, where he earned state defensive player of the year as a defensive back and was a standout sprinter.

Students, parents and co-workers lauded Lowe’s actions on Twitter. Several also noted that the school’s prom, scheduled for Saturday, was still on.

Olivia Katbi Smith wrote on Twitter that she coaches track with Lowe at Parkrose and wasn’t surprised to learn what he did.

“As soon as I heard what happened I knew it was him because he would do anything for these kids. It was surreal to be waiting for my athletes behind caution tape today, but might have been much worse if not for Keanon,” she wrote.

Lopes Serrao said the student with the gun will not be returning to school, and that school will resume on Monday as usual with an enhanced security presence.