Trystan Andrew Terrell has been formally charged with murder, attempted murder and other offenses related to a deadly shooting Tuesday on the campus of the University of North Carolina at Charlotte, police announced Wednesday morning.

The suspected gunman who was accused of killing two people and injuring four more at the University was seen smirking as he was being led into the police station by two officers on April 30.

22-year-old Trystan Terrell, who was seen dressed in dark clothing and hands cuffed behind him, turned to one of the reporters outside the Charlotte-Mecklenburg Police Department and smiled.

WCNC also reported that Terrell shouted something that was inaudible at the reporter while he was being ushered into the police headquarters. A video shows one of the officers escorting the gunman inside jerking his left arm right after he makes the comment before they disappear into the building.

The authorities have since confirmed that charges are pending against Terrell. The man was a history major at the school before he dropped out this semester. Eyewitnesses said that Terrell had been sitting in a class with other students before he opened fire with a handgun inciting mass panic in the school. It is still not known why he was in the class after he dropped out.

The suspect's grandfather Paul Rold of Arlington, Texas, told the Associated Press that Terrell and his father moved to Charlotte from the Dallas area about two years ago after his mother died. Terrell taught himself French and Portuguese with the help of a language learning program his grandfather bought him and was attending UNC-Charlotte, Rold said.

Trystan Terrell (Source: Mecklenburg County Sheriff's Office)

Terrell never showed any interest in guns or other weapons and the news he may have been involved in a mass shooting was stunning, said Rold, who had not heard about the Charlotte attack before being contacted by a reporter. "You're describing someone foreign to me," Rold said in a telephone interview Tuesday night. "This is not in his DNA."

According to the North Carolina State Board of Elections, Terrell is currently a registered member of the Libertarian Party. He has also been described as a white male whose ethnicity is "non-Hispanic or Latino".

Students gather on the campus of the University of North Carolina Charlotte after a shooting Tuesday afternoon, April 30, 2019, in Charlotte, N.C. (Source: John Simmons/The Charlotte Observer via AP)

Tristan Field, who is a student at the Charlotte campus, tweeted: "There was an active shooter in my room in the Kennedy building at UNC Charlotte, get to safety immediately. Why would anyone do this? We were just doing presentations and someone started shooting up the room. We didn't do anything but our work. Stay safe UNCC..."

He then added: "The shooter at UNCC didn't say anything. He just started shooting during our final presentations and we all ran out. I'm praying for everyone that got hit and UNC Charlotte as a whole. Why here? Why today? Why UNC Charlotte? Why my classroom? What did we do?"

Field and Terrell had been sitting in the same lecture for the Science, Technology, and Society class with Professor Adam Johnson.

Charlotte-Mecklenburg crime scene investigators talk in front of the Kennedy building where a gunman killed two people and injured four students at UNC Charlotte May 1, 2019, in Charlotte, North Carolina (Source: Sean Rayford/Getty Images)

MEA WorldWide (MEAWW) previously reported that Terrell had shot up the school on April 30 killing two and wounding four others.

The authorities said that officers who were gathered ahead of a campus concert raced over and disarmed the suspect in the room where the shooting happened.

With AP inputs.