— A North Carolina State University student was involuntarily committed last month for mental health treatment after confessing to campus police that he had planned to go on a killing spree, according to a court document.

Campus police checked on the student on July 17 after his girlfriend told officers she was worried about his well-being.

The student, a former Marine sniper who served two tours of duty in Iraq, told officers that he was depressed and had been diagnosed with post-traumatic stress disorder and bipolar disorder.

According to an application for a search warrant to gain access to the student's computer files, he gave campus police a detailed account of how he would daydream in class about robbing banks and killing people. He would draw up maps and outline which weapons he would use.

"He stated that he has pictured what the victims would look like when he shot them in the head and killed them," the document states.

The student told police that he lost all respect for law enforcement when he was 12. His younger sister was hit by a car driven by a local police officer's wife, and the police who investigated the case "did not appear to be professional and appeared to promote a 'cover-up,'" the document states.

He said he wanted to kill a law enforcement officer to get a badge, which he said would help him gain membership in the Hells Angels motorcycle gang, according to the search warrant application. He said he planned to follow an officer who took his patrol car home while off duty.

"He explained that he felt officers with take-home vehicles were easy targets," the document states, noting that the student also planned to kill the officer's family.

Campus police shared the information with Wake County prosecutors, but authorities said an investigation turned up no real threat.

The student was taken to the VA Hospital in Durham for treatment.