Charlotte, May 1 (AFP) Two people were killed and at least four wounded on Tuesday in a shooting at the University of North Carolina's Charlotte campus, local media reported.

The university's office of emergency management tweeted an alert warning that shots had been reported on campus shortly before 6 pm pm, on what was students' last day of classes this academic year.

"Run, Hide, Fight. Secure yourself immediately," it said.

Local ABC affiliate WSOC-TV reported that two people had been killed, while another two sustained life-threatening injuries and two more were being treated for less serious wounds.

Police confirmed the shooter, identified by NBC Charlotte as a 22-year-old history student at the campus, was in custody.

A local Fox television affiliate meanwhile identified the dead as boys aged 17 and 18.

"Scene secure. One in custody. No reason to believe anyone else involved," the Charlotte-Mecklenburg Police Department tweeted, adding that law enforcement and university staff were sweeping buildings to round up those still sheltering.

Charlotte Mayor Vi Lyles said she was "in shock" after hearing of the rampage.

"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," she wrote on Twitter.

The shooting comes just days after a teenage gunman opened fire on a synagogue in Poway, California, killing one person and injuring three others. AFP

(This is an unedited and auto-generated story from Syndicated News feed, LatestLY Staff may not have modified or edited the content body)