(CN) - A man who was arrested after being accused of stalking pop singer Rihanna should not be bound by a permanent restraining order, a New York appeals court ruled.
Kevin McGlynn was found mentally unfit for trial after he was arrested in 2014 on charges of stalking the singer, whose real name is Robyn Fenty.
He was subsequently transferred to the South Beach Psychiatric Center, according to court records. The Richmond County Supreme Court conducted a retention hearing and denied McGlynn's request to be released from the center.
In addition, the court enjoined McGlynn from contacting Rihanna while he was at the center, despite the fact that his counsel agreed with the attorney general that the court lacked authority to issue the injunction.
McGlynn, who is in his mid-50s, appealed the restraining order, which prevented him from contacting Rihanna or visiting her home or workplace.
The Brooklyn-based Second Department New York Appellate Division agreed and vacated the protection order.
"The remedies available to the Supreme Court under Mental Hygiene Law 9.31 are limited to either release or retention of the petitioner," the justices wrote in an unsigned opinion.
However, they added that the lower court should have the authority that it asserted.
"We are concerned by the omission of authority to issue an order of protection in the specific context of a proceeding pursuant to Mental Hygiene Law 9.31," the ruling states. "Accordingly, we urge the Legislature to consider whether it should enact an amendment to Mental Hygiene Law 9.31 authorizing a court, under necessary and appropriate circumstances consistent with public safety, the welfare of the community, and the rights of all involved, to issue an order of protection or the equivalent thereof."
According to the New York Daily News, McGlynn hand-delivered three "eerie letters" to Rihanna's SoHo apartment. Police apprehended him after he dropped his benefits card in her building.
"McGlynn bizarrely claimed Rihanna, Jay-Z and Kanye West ripped off 'my material' at his arraignment," the newspaper reported.
According to the U.K.'s Daily Mail, when Judge Abraham Clott was told that McGlynn was accused of stalking Rihanna, he replied, "Who?"
Read the Top 8
Sign up for the Top 8, a roundup of the day's top stories delivered directly to your inbox Monday through Friday.