Police say a note found in a 16-year-old New Mexico boy's pocket indicated that he had planned to kill his ex-girlfriend and others on Valentine's Day, when he fired a gunshot inside his high school.

No one was injured in the shooting Thursday morning at V. Sue Cleveland High School in Rio Rancho, a suburb of Albuquerque.

A search warrant affidavit filed by authorities in court and obtained by the Albuquerque Journal on Friday said that the teen also intended to kill himself, but instead put down the weapon after opening fire and ran to a dry wash where he was arrested.

Citing surveillance video, police said they teen wore a ski mask that he took off before entering the school.

The Associated Press is not naming the boy because of his age.