Image caption Yihe Xiong has been sentenced to eight months in prison

A student who sparked an armed police response when he took a fake gun to a university campus has been jailed.

Yihe Xiong, 25, a postgraduate student from China, took the replica firearm on to the University of Exeter's Streatham site in Devon on 19 June.

Parts of the campus were evacuated as news of the incident spread.

At Exeter Crown Court, Xiong was jailed for eight months for possession of an imitation firearm with intent to cause fear of violence.

Sentencing, Judge Peter Johnson said: "This was a calculated action of breathtaking stupidity."

Armed police were called to the university over reports of a man making threats while in possession of a handgun.

Witnesses reported officers "stormed into the Amory building", a centre for humanities on the Streatham campus.

Image copyright PA Media Image caption The imitation Beretta pistol was described as "very realistic"

Xiong, of Bonhay Road, Exeter, who was studying for a masters degree in computer science, was arrested and the weapon seized, although police said at the time it was not a "viable firearm".

He waved the black replica pistol in the face of other students, the court heard, telling them he had "12 bullets in this pistol and if my presentation goes badly I'm going to start opening fire".

Herc Ashworth, for the prosecution, said he then pointed the fake gun at three students and "made a jerking action".

Image copyright Beth Mahony Image caption There was a massive armed police response

After his arrest, Xiong said he was "kidding", the court heard.

Defending, barrister Brian Fitzherbert said it was a lack of judgement by someone who thought he was being "daring and funny".

He was thrown out of the university and lost an opportunity to study for a PhD in Canada, the court heard.

However, Judge Johnson said Xiong terrified students who did not know if someone was "going on a killing spree".