Students and faculty file out of buildings with their hands up during a lockdown after a shooting on the campus of University of North Carolina Charlotte in University City, Charlotte, on April 30, 2019. - Six people were shot, two of them died on the University of North Carolina Charlotte campus. One person was taken into custody, according to police sources. (Photo by Logan Cyrus / AFP)        (Photo credit should read LOGAN CYRUS/AFP/Getty Images)
PHOTO: Logan Cyrus/AFP/Getty Images
Students and faculty file out of buildings with their hands up during a lockdown after a shooting on the campus of University of North Carolina Charlotte in University City, Charlotte, on April 30, 2019. - Six people were shot, two of them died on the University of North Carolina Charlotte campus. One person was taken into custody, according to police sources. (Photo by Logan Cyrus / AFP) (Photo credit should read LOGAN CYRUS/AFP/Getty Images)
Now playing
01:12
Deadly shooting on campus of UNC Charlotte
AURORA, CO - DECEMBER 15: (EDITORIAL USE ONLY) Rocky Mountain Regional VA Medical Center investigational pharmacy technician Sara Berech prepares a dose of the Johnson & Johnson COVID-19 vaccine for a clinical trial on December 15, 2020 in Aurora, Colorado. The Johnson & Johnson vaccine could be submitted for emergency use by late January and is the only vaccine among leading candidates given as a single dose. (Photo by Michael Ciaglo/Getty Images)
PHOTO: Michael Ciaglo/Getty Images
AURORA, CO - DECEMBER 15: (EDITORIAL USE ONLY) Rocky Mountain Regional VA Medical Center investigational pharmacy technician Sara Berech prepares a dose of the Johnson & Johnson COVID-19 vaccine for a clinical trial on December 15, 2020 in Aurora, Colorado. The Johnson & Johnson vaccine could be submitted for emergency use by late January and is the only vaccine among leading candidates given as a single dose. (Photo by Michael Ciaglo/Getty Images)
Now playing
02:46
FDA says Johnson & Johnson vaccine is safe and effective
AUGUSTA, GEORGIA - NOVEMBER 15: Tiger Woods of the United States looks on from the third tee during the final round of the Masters at Augusta National Golf Club on November 15, 2020 in Augusta, Georgia. (Photo by Patrick Smith/Getty Images)
PHOTO: Patrick Smith/Getty Images
AUGUSTA, GEORGIA - NOVEMBER 15: Tiger Woods of the United States looks on from the third tee during the final round of the Masters at Augusta National Golf Club on November 15, 2020 in Augusta, Georgia. (Photo by Patrick Smith/Getty Images)
Now playing
02:43
Tiger Woods' team gives an update on his condition
Connolly
PHOTO: CNN
Connolly
Now playing
03:51
'I will not be lectured' on bipartisanship: Lawmaker fires back at Jim Jordan
PHOTO: KCAL/KCBS
Now playing
01:37
Official details speaking with Woods in moments following accident
PHOTO: CNN
Now playing
04:15
Experts: Former CIA agent victim of microwave weapon in Moscow
Trump supporters clash with police and security forces as people try to storm the US Capitol on January 6, 2021 in Washington, DC. Demonstrators breeched security and entered the Capitol as Congress debated the 2020 presidential election Electoral Vote Certification.
PHOTO: Brent Stirton/Getty Images
Trump supporters clash with police and security forces as people try to storm the US Capitol on January 6, 2021 in Washington, DC. Demonstrators breeched security and entered the Capitol as Congress debated the 2020 presidential election Electoral Vote Certification.
Now playing
04:34
This is what we learned from Capitol riot hearing
Now playing
02:08
Cabinet secretary explains why he took on challenging role
Angelo Quinto
PHOTO: Law Offices of John Burris
Angelo Quinto
Now playing
02:00
Man dies after police kneel on his neck, family says
PHOTO: AFP/Getty Images
Now playing
04:54
Ocasio-Cortez rips Democrat's doubts about Biden nominee
Then-President Donald Trump addresses supporters during a Make America Great Again rally in Erie, Pennsylvania, October 20, 2020.
PHOTO: SAUL LOEB/AFP/Getty Images
Then-President Donald Trump addresses supporters during a Make America Great Again rally in Erie, Pennsylvania, October 20, 2020.
Now playing
02:44
What Trump's released tax records mean for DA's criminal case
From left, President Joe Biden, First Lady Jill Biden, Vice President Kamala Harris and her husband Doug Emhoff, bow their heads during a ceremony to honor the 500,000 Americans that died from COVID-19, at the White House, Monday, Feb. 22, 2021, in Washington. (AP Photo/Evan Vucci)
PHOTO: Evan Vucci/AP
From left, President Joe Biden, First Lady Jill Biden, Vice President Kamala Harris and her husband Doug Emhoff, bow their heads during a ceremony to honor the 500,000 Americans that died from COVID-19, at the White House, Monday, Feb. 22, 2021, in Washington. (AP Photo/Evan Vucci)
Now playing
05:45
Biden leads nation in mourning 500,000 US Covid-19 deaths
PHOTO: NASA
Now playing
01:15
Watch the Perseverance rover's first footage of Mars
donald trump juicio politico violencia capitolio presidente eeuu gobierno senado aristegui mexico roberto izurieta republicanos democratas_00002909.png
donald trump juicio politico violencia capitolio presidente eeuu gobierno senado aristegui mexico roberto izurieta republicanos democratas_00002909.png
Now playing
02:48
Supreme Court allows release of Trump tax returns
trump impuestos fiscal nueva york eeuu corte suprema investigacion dusa juan carlos lopez_00021006.png
trump impuestos fiscal nueva york eeuu corte suprema investigacion dusa juan carlos lopez_00021006.png
Now playing
04:06
Trump fires back at Supreme Court ruling in statement
Now playing
02:27
Bash: Cruz looking for Fox News sound bite at Garland hearing
Now playing
04:34
See what has happened to Trump's DC hotel after his loss
(CNN) —  

A man armed with a pistol opened fire on the final day of classes at the University of North Carolina at Charlotte, killing two people and leaving four others wounded – three of them critically, authorities said.

The former student, whom authorities identified as Trystan Terrell, 22, apparently targeted the Kennedy building, police said.

“We know there was some familiarity with that building in particular,” Charlotte-Mecklenburg Police Chief Kerr Putney told reporters Wednesday, declining to elaborate. “The choice of that building was by design. It was intentional.”

Just before 6 p.m. Tuesday, gunshots erupted as students waited for rapper Waka Flocka Flame’s concert and others prepared for exams later in the week.

“Run, Hide, Fight,” the university tweeted after it received calls on the shooting at the Kennedy building. “Secure yourself immediately!”

Sophomore Joshua Ayers, 20, was in the classroom when the shooter entered. The liberal studies class has about 100 students, but only about 30 were on hand Tuesday for final presentations, one of which was underway when the shooting began, he said.

Suspect Trystan Terrell, 22, faces multiple charges, including two counts of murder.
PHOTO: Mecklenburg Co. Sheriff's Office
Suspect Trystan Terrell, 22, faces multiple charges, including two counts of murder.

“All of a sudden, the door on the north side of the room slams open. A guy rushes in, pulls up a gun with his right hand … and began firing at the far north corner table,” Ayers said. “He didn’t speak a word – just ran in and started shooting.

“Almost immediately, people start diving away. … People started rushing for the door,” he said.

Riley Howell was killed but not before he charged the gunman, his aunt, Morgan Howell Moylan, told CNN on Wednesday, recounting the police account to the family. He was shot point-blank trying to thwart the attack, she said.

“He did such a heroic thing,” Moylan said. “It was absolutely no surprise. In fact, I have four children who so look up to him. Every one of them said, ‘Of course, he was the hero – 100% of course he’d run toward the shooter.’ He was everybody’s protector. You felt safe when you were with Riley.”

Terrell was taken into custody without incident. As police led him away in handcuffs, he tilted his head back and smiled at the cameras.

Terrell is facing two counts of murder, four counts of attempted murder, four counts of assault with a deadly weapon with intent to kill and one count each of possession of a firearm on educational property and discharging a firearm on educational property, the Charlotte-Mecklenburg Police Department said.

He is being held without bail and is scheduled to make his first court appearance at 1 p.m. Thursday.

“We, all of us, everyone in this community, stands in shock and grief,” Charlotte Mayor Vi Alexander Lyles told reporters.

’Randomness’ of shooting concerns authorities, police chief says

Authorities have not yet identified a motive for the shooting.

“Unfortunately, this is an incident that really strikes a chord with us all. We can’t really discern the why just yet,” Putney said. “It really appears that there was no specific person.”

“And the randomness is what’s more concerning,” he added.

Terrell legally purchased the handgun he used in the shooting, Putney said. He had “quite a bit” of ammunition with him, the police chief said.

Putney declined to say specifically whether Terrell referenced any other school shooting.

“Unfortunately, there are people who want to replicate stuff like that,” Putney said.

Campus was on lockdown for hours

Reed Parlier
PHOTO: courtesy Parlier family
Reed Parlier

The university said Howell of Waynesville, North Carolina, and Reed Parlier, 19, of Midland, North Carolina, were killed. University officials identified the injured victims as Rami Al-Ramadhan, 20, of Saihat, Saudi Arabia; Sean DeHart, 20, of Apex, North Carolina; Emily Houpt, 23, of Charlotte; and Drew Pescaro, 19, of Apex.

The campus newspaper reported that Pescaro is one of its sportswriters. Moylan said Howell is the oldest of four siblings, and he transferred to UNC Charlotte from an Asheville technical school. He enjoyed working out, the outdoors, cooking and driving the boat during trips to the lake house. He was a “big teddy bear” who wanted to join the military, his aunt said.

“For his side hustle, he worked for a landscaping company. He’d always deliver the biggest trees because he was able to pick them up. The old ladies loved him,” Moylan said.

The school of about 30,000 students remained on lockdown for hours as a familiar scene replayed at the latest shooting in the United States.

While authorities worked to clear buildings, panicked students crouched in halls as helicopters buzzed overhead. Officers escorted students out of buildings with their hands up.

University officials sent an alert asking students to follow instructions from officers and warning others to stay away from campus until they received an all-clear.

“If you have not contacted your family, please do so,” the campus tweeted.

UNC Charlotte Chancellor Philip Dubois receives a hug after a news conference on the deadly shooting.
PHOTO: David T. Foster III/AP
UNC Charlotte Chancellor Philip Dubois receives a hug after a news conference on the deadly shooting.

By midmorning Wednesday, the university was quiet. Reporters outnumbered students and faculty making their ways across campus. Workers were fixing a door at the library where several students sought cover during the shooting.

Local and state police guarded the Kennedy building, which houses administrative offices and some classrooms, in what is typically a busy part of campus.

University Chancellor Philip Dubois said the campus will return to normal operating status at midnight and employees will return to work Thursday morning.

Exams, set to begin Thursday, were canceled through the end of the week.

He started shooting during presentations

Family members and friends wait for their loved ones after the shooting.
PHOTO: LOGAN CYRUS/AFP/Getty Images
Family members and friends wait for their loved ones after the shooting.

Tristan Field said the gunfire started while he was in class.

“He just started shooting during our final presentations and we all ran out,” Field tweeted. “We were just doing presentations and someone started shooting up the room. … Why here? Why today? Why UNC Charlotte? Why my classroom? What did we do?”

Monifa Drayton, an assistant vice president at Atrium Health, told CNN affiliate WBTV that she was walking into the building to teach a class when gunfire rang out. Terrified students dashed outside the building. She helped lead them to a nearby parking deck.

“The children were absolutely petrified,” Drayton said. “And I also sat and waited with a gentleman whose girlfriend … was in the library. And at that point the library doors had been shot out and she was in there barricaded.”

The shooting happened days after a gunman opened fire at a synagogue near San Diego, killing a woman and wounding three others.

“I can’t tell you the sadness of the entire community to know that a situation like this has occurred on our campus,” UNC Charlotte police Chief Jeff Baker said. “We are all pretty much devastated.”

Dubois called it “the saddest day” in UNC Charlotte’s history.

Officers were nearby when gunfire started

A student sits under a tree after the shooting on the Charlotte campus.
PHOTO: Logan Cyrus/AFP/Getty Images
A student sits under a tree after the shooting on the Charlotte campus.

When the initial reports of a shooting came in at 5:42 p.m., officers were nearby, getting their assignments and a briefing for the Waka Flocka Flame concert. The rapper later said he was safe and nowhere near campus.

An officer quickly went to the room from where the suspect opened fire, disarmed him and took him into custody, Baker said. At the time of his arrest, the suspect was armed with a pistol, he said.

The suspect did not say a word while he was being handcuffed.

“Right now, he is not somebody (who) was on our radar,” Baker said.

Giffords: ‘You deserve better’

Frustrated officials decried yet another shooting at a campus in the United States.

“A student should not have to fear for his or her life when they are on our campuses,” Gov. Roy Cooper told reporters. “Parents should not have to worry about their students when they send them off to school. And I know that this violence has to stop.”

The governor ordered all flags in the state lowered to half-staff through sunset Friday.

Former US Rep. Gabby Giffords, who survived gun violence, sent condolences to the victims’ families.

“I am so sorry for these young people and their families. We fail as a nation when we fail to protect our children. You deserve better,” she said on Twitter.

Suspect’s neighbor speaks

Students and faculty convene near an entrance to campus after the shooting.
PHOTO: Logan Cyrus/AFP/Getty Images
Students and faculty convene near an entrance to campus after the shooting.

At the apartment complex where the suspect lived, residents watched as police entered a unit believed to be his and stayed for hours.

“It’s alarming. It’s kind of scary. It’s surreal. You know, you hear about these types of things that happen, unfortunately, all around the country,” neighbor Harold Lloyd told CNN affiliate WCCB. “You never would think that it would occur, well that the person apparently who did it lives in the same building as you.”

CNN’s Dianne Gallagher, Eliott C. McLaughlin, Marlena Baldacci, Joe Sutton, Steve Almasy, Jamiel Lynch, Dave Alsup, Tina Burnside and Darran Simon contributed to this report.