A man with a pistol walked into a classroom at the University of North Carolina Charlotte late Tuesday afternoon and opened fire, fatally shooting two people and injuring four others on the last day of classes, the authorities said.
Chief Jeff Baker of the U.N.C.C. Police and Public Safety Department said at a news conference that three of those injured were in critical condition. The fourth had less serious injuries, he said.
The police disarmed the suspect and took him into custody at a building on campus, Chief Baker said. The Charlotte-Mecklenburg Police Department identified the suspect as Trystan Andrew Terrell, 22.
The police declined to elaborate on a possible motive for the shooting.
“One officer immediately went to the suspect to take him down,” Chief Baker said.
He said the gunman did not say anything when he was taken into custody. “Our officers’ actions definitely saved lives,” he said.
Mr. Terrell was charged with two counts of murder, four counts of attempted murder, four counts of assault with a deadly weapon with intent to kill, possession of a firearm on an educational property and discharging a firearm on an educational property.
Just before 6 p.m., the campus’s office of emergency management reported that shots were fired near the Kennedy Building, an administrative building in the middle of campus.
Katie Ballard, 24, a graduate student in gerontology, was sitting in a classroom in a nearby building when her professor stepped out. The professor came back in and said she heard somebody had been shot. Then an alert popped up on a projector screen at the front of the class saying that gunshots had been fired close by.
“Run, Hide, Fight,” the alert said. “Secure yourself immediately.”
Ms. Ballard ran with about 30 other students to an empty room nearby and locked the doors.
Ms. Ballard never heard any gunshots, but she heard helicopters buzzing while locked in the room. She heard students running up and down the halls. Through the window, she saw a man who had been shot in the abdomen. A handful of paramedics crouched around him, tending to his wounds.
“It was so surreal,” Ms. Ballard said. “I just felt all the blood leave my face. I felt there’s no way this is real.”
Eventually, she said, “the police came and knocked on the door, and we were all escorted out with our hands above our head.”
Videos posted on Twitter showed police officers running in one direction while students streamed in the other direction.
“We are in shock to learn of an active shooter situation on the campus of UNC Charlotte,” Vi Lyles, the mayor of Charlotte, said in a tweet. “My thoughts are with the families of those who lost their lives, those injured, the entire UNCC community and the courageous first responders who sprang into action to help others.”
It was the final day of classes for the school year, with graduation ceremonies scheduled for early May. Some students were getting ready for the summer break, and some were preparing to attend an on-campus concert featuring the rapper Waka Flocka Flame, which was canceled after the shooting.
Joan F. Lorden, the school’s provost and vice chancellor for academic affairs, said at a news conference late Tuesday evening that the school had canceled final exams through Sunday.
“From today through the weekend,” she said, “everything academic is essentially canceled.”
Gov. Roy Cooper of North Carolina said at the news conference that the state would take a “hard look” at how such shootings could be prevented in the future.
“This is a tough day, but this university will get through it,” Mr. Cooper said. “One thing I do know is a student should not have to fear for his or her life when they are on our campuses.”
The episode was yet another in a series of deadly shootings that have made headlines across the United States. It happened three days after a gunman opened fire at a synagogue in Poway, Calif., killing a congregant there, and came on the heels of anniversaries of other deadly school shootings. It has been a little more than one year since 17 people were killed in Parkland, Fla., and two decades since 13 were killed at Columbine High School.
U.N.C. Charlotte is a public university with an enrollment of about 30,000. It is the largest postsecondary educational institution in the Charlotte area.