Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

AZTEC, N.M. — Students hid in their classrooms, some behind locked doors, as a suspect opened fire Thursday inside a New Mexico high school, killing two children before ending up dead.

Authorities and other officials in the small town of Aztec, near the Colorado border, released few details other than to say that the shooter was male and that the two victims attended Aztec High School. No other injuries were reported.

Local and federal authorities were investigating what led to the shooting and said they wouldn't release any details about the circumstances for now, including whether the shooter died by suicide or was killed by police.

Garrett Parker, a sophomore, told Albuquerque television station KOAT that he was upstairs in history class when he heard what he initially thought was students banging on lockers.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

As the noise got louder and closer, school officials issued a warning over the loudspeaker.

"Thankfully, our teacher always locks the door no matter what. So he kept that locked," Garrett said. "When they called over the intercom that it was not a drill, we went to the corner of the room out of sight from the door and just started hiding."

Garrett said it felt like a dream.

Related: Stickman drawing of school shooting on student's homework leads to Florida man’s arrest

Some parents reported hearing from their children via text messages that they could hear the shooter approaching.

The school of about 900 students was cordoned off as authorities cleared the campus and teens were taken to another location where they could be reunited with their parents.

Nervous parents initially gathered outside City Hall to wait for more information as officers tried to reassure them.

All schools in town closed for the day. Authorities said there were no other credible threats to students at the high school or other schools in the neighboring communities of Bloomfield or Farmington.

Aztec is a rural community of 6,500 people in the heart of northwestern New Mexico's oil and gas country and near the Navajo Nation. Its main street is lined by old brick buildings that date back more than a century.

Residents voiced disbelief on social media, while members of the New Mexico congressional delegation, state Attorney General Hector Balderas and other elected officials offered their condolences and other assistance.

"While details are still coming in, we grieve for the innocent victims in this senseless act of violence. Too many lives have been disrupted and too many futures cut short," U.S. Rep. Ben Ray Lujan said on Twitter.