One of the two students killed when a gunman opened fire at the University of North Carolina at Charlotte was hailed as a hero by authorities Wednesday for confronting the shooter and ultimately giving his life to save others.

Riley Howell, 21, and Ellis Parlier, 19, were the students shot dead Tuesday as four others were wounded during the last day of classes, according to the Charlotte-Mecklenburg Police Department.

"What you may not hear is the first and foremost hero, as far as I’m concerned, and his name is Riley Howell," Charlotte-Mecklenburg Police Chief Kerr Putney said Wednesday.

Riley Howell was killed in a shooting at the University of North Carolina at Charlotte on April 30, 2019. Courtesy of Thomas Howell

Putney would not give details about what happened in the classroom Tuesday afternoon, citing a promise to Howell's father and a pending investigation, but did reveal that the 21-year-old "took the fight" to the alleged gunman and got him "off of his feet."

Howell followed the run, hide, fight method authorities have used to prepare citizens for active shooters, Putney said.

"Having no place to run and hide, he did the last," Putney said. "But for his work, the assailant might not have been disarmed. Unfortunately, he gave his life in the process, but his sacrifice saved lives."

Howell was an environmental studies major, Dr. Philip Dubois, the chancellor of UNC Charlotte, said.

Howell's family said in a statement that he was "truly a one-of-a-kind guy" who loved "Star Wars, birds, cars, snowboarding, going to the lake, Kentucky Hot Browns cooking from scratch with cast iron while listening to the Feel Good Classic Soul playlist, and his Lauren."

"He always was able to put others before himself and never hesitated to help anyone who needed it. He was friends with anyone and everyone — a big, muscular guy with a huge heart," the statement said.

Lauren Westmoreland, his girlfriend, wrote on Facebook, "I keep hoping and hoping I will wake up from this awful dream, but I know that I won’t."

Drew Pescaro, 19, Emily Houpt, 23, Sean DeHart, 20, and Rami Alramadhan, 20, were the students wounded, police said. Alramadhan is from Saudi Arabia and his father is traveling to the United States to be with him, Dubois said.

The student-run Niner Times newspaper tweeted that Pescaro is a sports writer at the publication.

All four are expected to survive, Dubois said, adding that three were still being treated and one has been released from the hospital.

"The only silver lining this morning is the four other students that were injured look like they're going to be fine," Dubois told former North Carolina Gov. Pat McCrory on WBT-AM.

Dubois said that he planned to visit the hospital and also "wander around campus" and counseling centers set up there to comfort students.

Finals are canceled through Sunday, but commencement ceremonies scheduled for May 10 and 11 will go on as planned.

Dubois said that every student who was set to walk at graduation will walk regardless of whether they've completed all of their tests.

"And we hope that when we get to that day, we feel a lot better than we feel now," he said. "We will not be defined by this."

A vigil organized by students on UNC Charlotte's campus will be held 6 p.m. Wednesday, according to the school.

Officials told NBC affiliate WCNC that the suspected shooter, Trystan Andrew Terrell, 22, was a history major at UNCC but had dropped out this semester.

Investigators don't believe he knew the two people he killed, according to a police report.

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 educational property, and discharging a firearm on educational property, police said.