MILFORD, Conn. — A Connecticut man who prompted a lockdown at the University of New Haven when he brought a semi-automatic rifle and other guns to campus was sentenced Friday to two years in prison.

William Dong, a former student at the school, was arrested Dec. 3, 2013, after a bystander alerted police. He brought two loaded handguns into a class, and police found a Bushmaster rifle and ammunition in his car, officials said.

Authorities also searched Dong's room at his parents' home in Fairfield and found 2,700 rounds of ammunition and newspaper clippings about the 2012 movie theater shooting in Aurora, Colorado, where 12 people were killed and 70 injured, officials said.

Dong had permits for the handguns, but firearms are banned from campus. He pleaded guilty in October to two counts of illegal possession of a pistol on school grounds and illegal purchase of a banned assault weapon.

Superior Court Judge Frank Iannotti in Milford sentenced Dong and told him that he created a "scary and hectic environment." The judge noted that a psychiatrist evaluated Dong and deemed him a low-level risk.

Iannotti also banned Dong from the University of New Haven campus, ordered him listed on the state's deadly weapon offender registry and ordered a mental health evaluation.

Dong's lawyer, Fred Paoletti, said his client had no history of criminal activity, mental illness or anti-social behavior. He said Dong was intent on protecting his family after his aunt was robbed in a home invasion in Greenwich.

"After that, the Cheshire home invasion and the Sandy Hook school shooting, he thought it was important to protect himself and his family and this (owning guns) was the way to do it," Paoletti said.

State's Attorney Kevin Lawlor said he still had concerns about Dong and the possibility of violence.

Dong also pleaded guilty to a gun charge in federal court in connection with the campus scare and is to be sentenced to up to five years in prison next month.