ALBUQUERQUE, N.M. — A shooting early Friday at a University of New Mexico dormitory killed a 14-year-old boy, wounded a 19-year-old and prompted the evacuation of hundreds of students and a campuswide search for the suspect, who has since been taken into custody.

University officials lifted a shelter in place order late Friday afternoon, saying there was still an active investigation and that the main campus in Albuquerque would remain closed. They said students were allowed to eat at the dining hall and return to their dorms but otherwise should avoid the crime scene.

New Mexico State Police Chief Troy Weisler said officers took a male suspect into custody about 2:30 p.m. John Fuentes, 18, was booked on the charges of first-degree murder, aggravated battery, aggravated assault and tampering with evidence, according to the New Mexico State Police. Fuentes will be held without bond and remain in custody until his conditions of release are determined by the district court.

It was unclear whether Fuentes has legal representation. Police said they did not have any information on the suspect’s representation. New Mexico Law Offices of the Public Defender will be looking at the case and getting Fuentes a legal representation team as soon as possible if he needs its representation, said spokesperson Maggie Shepard. An email was left with the public defender representing Fuentes during his arraignment Saturday.

Four people, including the suspect, were playing video games inside a dorm room belonging to one of them when the shooting began, Joseph Silva, chief of the University of New Mexico Police Department, said at a news conference.

The 14-year-old was fatally shot, and the others fled the room, Weisler said. A 19-year-old male sought treatment at a hospital and said he was shot on campus.

Authorities were investigating why the suspect fired a gun, Weisler said. Police were working with prosecutors to draft charging documents, he said.

Officials issued an initial alert just before 3:30 a.m. that a shooting had taken place. Another alert asking people to shelter in place was sent out just after 6 a.m. Police evacuated parts of the campus.

“We had a student orientation going so there were like 400 kids in dorms, so we wanted to make sure they were safe,” said Lt. Tim Delgado with the University of New Mexico Police Department.

For much of the day, authorities had the area around the student housing complex cordoned off with yellow tape as police vehicles blocked roadways and investigators gathered.

Mikey Beck, who was staying in student housing last week as part of new student orientation, said he heard gunshots overnight and saw what appeared to be an injured person hiding in some bushes.

Two other people jumped out of a dorm window and ran, he said.