A "highly intelligent" student with mental health problems who sexually assaulted a woman is likely to be deported, a judge has said.
Hang Zhang, 27, pulled down the shorts of a female student, a court heard.
The Chinese national, of Hawley Street, Sheffield, had previously been arrested for carrying a knife near Buckingham Palace in 2016 and was subsequently sectioned under the Mental Health Act.
Judge Jeremy Richardson QC ordered Zhang be detained at a secure hospital.
Zhang appeared at Sheffield Crown Court over the sexual assault he admitted committing on the Chinese student at the University of Sheffield in October.
Judge Richardson said the defendant had developed a "penchant" for following Chinese women students and he followed one out of a gym class and pulled down her shorts.
The judge said: "She was quite understandably acutely embarrassed and appalled."
Judge Richardson said both incidents were "bizarre" and he was sure that Zhang was suffering from a complex mental disorder - almost certainly bipolar affective disorder. (NO HE WAS SUFFERING FROM LACK OF SEX BUDDYBOY judge. Look up 'inceldom' Mr Richardson)
Referring to the sexual assault in Sheffield, the judge said: "It was, on any analysis, disgraceful conduct but it was equally quite bizarre."
He ordered Zhang to be detained at a medium secure hospital, saying that if he had not been mentally ill he would have been given an immediate prison sentence