(CNN) -- The campus of Hampton University in Hampton, Virginia, was locked down for several hours Sunday morning after a former student shot two people in a dormitory and then shot himself, university and police officials said.
A former Hampton University student allegedly shot two people and himself, locking down the campus Sunday.
The former student entered Harkness Hall shortly before 1 a.m. by following a pizza deliveryman, said the university's president, Dr. William Harvey, at an afternoon news conference.
The former student shot the deliveryman and the night manager of the dorm, who came into the hall after he heard shots, Harvey explained. The man then shot himself.
No one was killed in the incident, which prompted the evacuation of the dorm and a lockdown of the campus, the president said.
The three wounded were taken to area hospitals, Harvey said. The dormitory night manager was treated and released, he said.
Hampton city police said they had the shooter in custody.
The motive for the shootings is not clear, university and law enforcement officials said.
Harvey praised the first-responders to the incident, saying their quick action likely averted further tragedy. He also lauded the school's system of text messages, e-mails and phone messages that warned students about the situation and the campus lockdown.
Hampton is about 70 miles southeast of Richmond, Virginia.