A Somalian refugee with a long list of convictions since he arrived in New Zealand in 1999 will be held as a special patient in a secure psychiatric unit, while attempts continue to deport him.
Mohyadin Farah appeared before Judge Ian Mill in the Wellington District Court on Thursday.
Judge Mill said Farah had suffered considerably in his life and, while he was vulnerable, he was also dangerous to others.
After his father was killed in tribal warfare when he was a young child, his mother took the rest of the family to a Kenyan refugee camp - leaving Farah and his older brother behind in Somalia to look after family property.
When his brother died, Mohyadin Farah escaped to Kenya by boat but was shipwrecked. While in hospital, a delay resuscitating him led to him developing a head injury.
Mr Farah had lost contact with his family but eventually they were found in New Zealand, and he moved here through a refugee family reunification programme.
Since then, his family have struggled to cope with his behaviour, and the court was told today they were ashamed and embarrassed about what he had done.
He was most recently charged with rape and assault but the charges did not proceed, as he was deemed unfit to stand trial.
Farah has previously spent time in prison for indecent assaults.
On one occasion, he approached a woman on a bus and grabbed her breasts and, when she tried to move away from him, he tripped her up and then shouted in Somali that he would kill her and do "bad things" to her.
Mr Farah told the woman he knew where she lived, and he was going to come and rape her.
Another similar incident led to him being trespassed from Wellington buses.
On another occasion, he knocked on the door of a woman who was unknown to him, repeatedly said he loved her and asked her for kisses.
In other incidents, Farah approached strangers, made explicit sexual advances and, when they were rejected, forced his way into the women's homes and indecently assaulted them.
Lawyer and family seek deportation
Mohyadin Farah's family and his lawyer both want him to be deported back to Somalia, but their efforts over the last two months to arrange that have been unsuccessful.
His mother has said she will return to Somalia with him if he is deported, and it is hoped that returning to the country where he was brought up will improve his life.
But his lawyer, Chris Nicholls, told the court he had run into a brick wall regarding deportation.
He said, in order to be deported, his client would have to apply to Immigration New Zealand to have his refugee status cancelled. Such requests are handled by a special section of the department, and his family would need to be interviewed before any action is taken.
Mr Farah would also need to get a Somali passport but, Mr Nicholls said, there is no legitimate government authority in Somalia that can issue them.
The order today giving him special patient status means he can be held in a psychiatric unit for up to 10 years, but his family and lawyer hoped he could be deported sooner rather than later.