OAKLAND — Two men in their early 20s entered a classroom at Oakland Technical High School shortly after 8 a.m. Tuesday and robbed three students at gunpoint, according to police.

DeJuan Lamont Davis, 22, and Deerick Minor, 20 — who stopped at a doughnut shop across the street from the high school before heading north on Broadway — were arrested by Oakland police at gunpoint at the Longs Drugs on Pleasant Valley Road, police said. A security officer at the high school followed the men to Longs and gave police information that led to the arrests.

None of the high school students were injured in the robbery, which happened in a second-floor government class about 20 minutes before the school day began, said Troy Flint, a spokesman for the Oakland school district.

Flint said the robbers had taken an AC Transit bus to the North Oakland high school that morning, reportedly harassing some of the students on the way. He said they entered the school through a side gate and went into a classroom, where they threatened four students. The teacher was out of the room at the time.

Police said Davis pointed a revolver at a group of students, forcing them to hand over their iPods. Officers Murray Hoyle and Nolan Chan recovered the weapon and three music players during the arrest. Davis tried to hide the weapon, but dropped it into a rubber container, police said.

Flint said the district would conduct a threat assessment of the school and its entrances, as is the protocol following such a security breach, and that a letter would be sent to parents.

“We’re very pleased with the way the security personnel responded,” he said. “Their actions were critical to apprehending the suspects.”

Flint said the Tech students seemed to be taking the incident “in stride” and that it was possible that some had not learned about it.

Keyera Lucas-Evans, a Tech student who was not victimized in the robbery, said she was troubled that armed intruders were able to enter her school but was thankful no one was hurt, and that the school’s security and the police acted quickly to apprehend the suspects.

“It’s crazy that that would happen,” she said. “It’s kind of like you never know what kind of stuff people come to school with.”

Keyera, who co-wrote and performed a school play about the ups and downs of Oakland this year, noted that this episode of gun violence came on the heels of the slaying of four police officers over the weekend. She said the robbery caught her by surprise — in spite of herself.

Katy Murphy is based in Sacramento and covers state government for The Mercury News and East Bay Times, a beat she took on in January 2017. Before that, she was the news organization's higher education reporter, writing about UC, CSU, community colleges and private colleges. Long ago, she covered Oakland schools and other K-12 education issues.