A Montgomery County, Md., high school installed mirrors to help monitor its hallways after two students were caught having sex earlier this year.

Miguel Cedillo, 18, is charged with fourth-degree sex offense, a misdemeanor, after allegedly having sex with a 14-year-old girl in the hallway near the attendance office at Richard Montgomery High School in Rockville. The students were supposed to be in class.

According to court documents, the girl consented to the February encounter, which ended when other students in the hallway interrupted them. The girl's parents contacted the school after learning about the incident from a parent of another student. The school then contacted police.

Cedillo is charged because of the age difference. Fourteen is too young to give legal consent for sex in Maryland.

"Because it was greater than four years and the victim was either 14 or 15, in this case 14," said Rockville City police Lt. Eric Over.

A hearing for Cedillo was scheduled for May 8, The Gazette reported. He is being assigned a public defender.

The incident prompted school officials to install mirrors to better monitor the hallways and reduce the opportunities for students to hide from security. Students told New4's Pat Collins at least a dozen mirrors have been installed.