A homeless man was wrongly arrested for a crime and locked up in a mental hospital for more than two years before officials realised their mistake, according to Hawaii court documents.
The Hawaii Innocence Project has asked a judge to rescind the arrest and correct Joshua Spiersterbach's records.
Joshua fell asleep on the pavement in 2017 while waiting in a long line for food outside a Honolulu shelter.
When a police officer woke him, Joshua thought he was being arrested for the city's ban on sitting or laying down on public sidewalks, but the officer had mistaken him for Thomas Castleberry, a man who had a warrant out for his arrest for violating probation in a 2006 drug case.

Joshua ended up with Castleberry's name even though he never claimed to be him or have met him, according to the Hawaii Innocence Project.
Lawyers for Joshua have said if police compared the two men's photographs and fingerprints it would have been clear their client was not Castleberry.
Joshua was committed to the Hawaii State Hospital (HSH) after he continued to protest his innocence.
The petition said: "Yet, the more Mr Spriestersbach vocalised his innocence by asserting that he is not Mr Castleberry, the more he was declared delusional and psychotic by the HSH staff and doctors and heavily medicated.
Sign up for our daily newsletter to keep up to date with all the essential information at www.mirror.co.uk/email .
"It was understandable that Mr Spriestersbach was in an agitated state when he was being wrongfully incarcerated for Mr Castleberry's crime and despite his continual denial of being Mr Castleberry and providing all of his relevant identification and places where he was located during Mr Castleberry's court appearances, no one would believe him or take any meaningful steps to verify his identity and determine that what Mr Spriestersbach was telling the truth - he was not Mr Castleberry."
Eventually, a hospital psychiatrist listened to him and Google searches and phone calls verified that Joshua was on another island when Castleberry was first arrested, according to the court document.

Fingerprints and photographs then concluded that Joshua had been wrongly arrested and he was quickly and secretly released, the petition said.
The court document said: "A secret meeting was held with all of the parties, except Mr Spriestersbach, present. There is no court record of this meeting or no public court record of this meeting.
"No entry or order reflects this miscarriage of justice that occurred or a finding that Mr Spriestersbach is not Thomas Castleberry."
Joshua, now 50, ended up at a homeless shelter after his release, and his family were contacted.
Vedanta Grittith told Associated Press: "Part of what they used against him was his own argument: 'I'm not Thomas Castleberry. I didn't commit these crimes. This isn't me'.
"So they used that as saying he was delusional, as justification for keeping him."
She said: "And then when light is shown on it, what do they do? They don't even put it on the record. They don't make it part of the case.
"And then they don't come to him and say, 'We are so sorry' or, how about even 'Gee, this wasn't you. You were right all along.'"
Joshua now refuses to leave his sister's home in Vermont over fears he will be taken again, she added.