Two law-enforcement agencies and Maricopa County prosecutors all missed an error that resulted in an innocent man charged wrongfully with 10 counts of possessing child pornography.

Following a grand jury indictment of a man with the same first and last names on August 28, 2017, sheriff's deputies threw the wrong man in jail. He spent three nights in the slammer before he could post bond.

On September 7, the man filed a lawsuit against the Chandler Police Department, the Maricopa County Sheriff’s Department, and the Maricopa County Attorney’s Office over the episode.

The man agreed to an interview with Phoenix New Times under the condition that the article didn't include his name. Despite his innocence, the man says even seeing his name associated with the false charges causes him pain.

"I wish this never happened. I wish for the people responsible for this to lose their jobs,” said the man in his first interview since the Arizona Republic reported his lawsuit on Saturday.

"This is truly a travesty of justice — the most unheard-of thing I would think could ever happen to a human being,” said Daniel Ortega, the man’s attorney.

It's unclear exactly when and how the innocent man's name got mixed up with the actual suspect. The lawsuit accuses an "unknown Chandler Police Department" employee with making the error before the case was forwarded to the Maricopa County prosecutors. The county attorney's office then failed to properly identify the man and he was indicted under his name and birth date instead of the suspect's.

The suspected child molester has the same first and last name as the man arrested by police that day. But his middle name, address, eye color, and date of birth are all different.

On September 12, 2017, Maricopa County deputy's sheriffs arrived at the man's office and told his boss they were looking for him. The man wasn't there, so they left a message for him to meet them at the downtown Phoenix Police Station.

He went to the station and was greeted by eight deputies who helped arrest him.

But they had the wrong guy.

The actual suspect is in custody in Oregon, Chandler police confirmed. An accused child porn distributor, he was arrested in 2014 by Chandler police after cops found child porn on his computer. He bonded out and fled from Maricopa County. As of today, he's in custody in Oregon, Chandler police confirmed. Jail booking data from Jackson County, Oregon shows someone with the same name and birth date as the suspect was arrested for multiple charges of sexually assaulting a child in July.

The innocent man was dumbfounded as the deputies who were arresting him called him a child molester.

"You guys are out of your mind. You have no clue who I am. I’m not that guy,” he told them. "The first thing that came out of one of those deputy's mouth was, ‘You sound like a guilty man.'"

The deputies drove the man to a transfer facility, where he was booked, photographed, fingerprinted, and processed. He appeared that evening before a judge who set his bail at $100,000.

"She told me my charges. My heart about stopped. I said, ‘You guys are crazy. You have the wrong man.’ She said, ‘Do you have anything else to say?’ I had nothing else to say,” he said.

The man borrowed $10,000 to pay 10 percent of his bond. He used his mother’s house as collateral for the rest. The county strapped him with an ankle bracelet and released him after three nights at Lower Buckeye Jail.

After he got out, the man’s son requested police records from Chandler Police Department and the Maricopa County Sheriff’s Office.

About two weeks later, the man’s family received police reports from Chandler police containing details about the actual suspect. The mistakes were glaring.

The first message he left was for the police.

"The lady called me and said, 'I regret to inform you that you were wrongly arrested.’"

"You’re regret to inform me? I was going to kill myself. I wasn’t going to go to prison with those charges."

He then called the Maricopa County Attorney’s Office.

"They said, 'We regret to inform you we made a mistake.’ You made a mistake? You gave me a death sentence," he said.

Prosecutors convened a special hearing the next day. They dropped the charges. But the nightmare wasn’t over.

The man, who works as a commercial door installer, said his company didn't pursue some jobs because the bogus charges still pop up on background checks.

"Most of my work is in schools, hospitals, and hotels. You think I could pass a background check to work in a school? There’s no way,” he said.

At least 15 websites that mine court records still list his name and charges, the man said. It will cost more than $4,000 to scrub his name and photos from the websites, he said.

The Chandler Police Department declined to comment for this story, citing pending litigation. Same with the Maricopa County Attorney’s Office.

When contacted for comment by New Times, Maricopa County Sheriff’s Office spokesperson Joaquin Enriquez wrongly stated that the department released the man after deputies discovered they had the wrong man. In fact, he bonded out.

When informed of the error in his reply, Enriquez issued another statement that said, "On September 12th 2017, the Maricopa County Sheriff’s Office apprehended an individual based on information that was contained in a grand jury indictment. Any further information or details will be released following the conclusion of the pending litigation."