A student at a New Mexico high school said in a note that he wanted to shoot his ex-girlfriend and others at the Cleveland High School in Rio Rancho on Valentine's Day, officials report.

According to KCRA-TV, surveillance camera footage captured the gunman—identified as 16-year-old Joshua Owen—approaching a group of students and pointing a handgun at at least one of them.

One of the students said the gunman pressed the trigger but the gun did not discharge. The student said that the assailant then manipulated the weapon and was able to fire a single shot.

A teacher said she saw the gunman running away after she received a text message from him saying, "I'm sorry Miss Sawyer but the voices won't stop."

Police located Owen about a mile away from the school and took him into custody.

Officers found a note in his pocket. It read:

Find ex gf

Kill ex gf

Kill other people

If You have a last bullet take your own life

Owen told police that he also had a note at his home apologizing for the attack.

According to reports, no one was hurt in the incident.