ROSWELL, N.M. — A 12-year-old boy who allegedly opened fire with a shotgun Tuesday inside his crowded middle school gymnasium here was being examined at an Albuquerque psychiatric facility Wednesday as his two victims remained hospitalized in Lubbock, Texas, officials said.

Nathaniel Tavarez, 11 remained in critical condition Wednesday morning at University Medical Center after undergoing two surgeries on Tuesday. Kendal Sanders, 12, was in satisfactory condition, Eric Finley, spokesman for the University Medical Center, told the Los Angeles Times.

Tavarez was shot in the face and neck and Sanders in the shoulder in the shotgun attack that took place before the first school bell at Berrendo Middle School, scattering students.

“The girl is obviously in better shape,” said Finley. “We don’t know if she’ll go home tomorrow or later this week.”

The middle school, which sits on a bluff on the northern reaches of this southestern New Mexico farming community of 50,000, remained closed as officials continued to interview witnesses in the rampage.

Some students remained shaken.

“I walked into the gym and heard the bangs, but I thought it was a joke -- people pop bags in school all the time,” Blas Mendez, 14, told the Los Angeles Times on Tuesday. “I didn’t think it was a gun until I heard all the screaming and crying.”

New Mexico State Police Chief Pete Kassetas said officers had interviewed 60 of the 500 people who were inside the gym at the time of the shooting. He said authorities planned to search the suspect's Roswell home, his school locker and his backpack.

Kassetas identified the weapon used in the shooting as a 20-gauge shotgun whose wooden stock had been sawed down, apparently to fit inside the bag in which it was sneaked into school.

He said police were investigating whether the suspect “published on social media about the attack.”

The 14-year-old Blas, in an interview with The Times, said he knew the suspect, who, he said, had warned friends and cousins not to go to the gym that morning. “He told them to go to the cafeteria instead,” Blas said.

He said the boy also warned of his attack on social media Sunday, two days before the shooting. Blas showed a post under the suspect’s online nickname that read, “Tomorrow will be the first Monday that will be fun for me lol never thot I’d say that.” However, it turned out the school was closed Monday because of plumbing problems.

At the evening news conference, authorities commended teacher John Masterson for approaching the armed boy and convincing him to lay down the weapon just after the shooting. They called him a hero.

Melissa Miranda was one of more than 1,000 community members who attended the vigil Tuesday night at the Roswell Convention Center, where people recited prayers and sang songs to the lead of a chorus and guitar player.

Miranda said all three of her children, two daughters and a son, were at the school at the northern end of town when the shooting occurred.

“I told them that no matter how bad this situation was, no matter how sad it makes you feel, it could have been a lot worse,” she said. “That young man had a gun and he opened fire in a crowd of students.”

Diego Miranda, 14, said the shooting took place before classes began and after the students had congregated in the gym, rather than in the schoolyard, because the day was cool and blustery.

He said the students were assembled on two facing bleachers, the eighth-graders taking up one and the sixth- and seventh-graders sitting in separate sections on the other.

“All the sixth- and seventh-graders started screaming and crying because they were the closest,” Diego said. “People started running out of the gym.”

Ellen Paiz, 13, was also in the gym. “I heard the first shots and thought they were fireworks,” she said.