A Los Angeles man who spent the last 11 years in prison for a string of robberies he did not commit was exonerated on Tuesday.

Ruben Martinez Jr. left the Los Angeles Superior Court a free man as his family members, who had been fighting for his release since he was wrongly convicted, cheered around him.

In 2008, the 49-year-old was convicted for five robberies at an auto paint shop in the Boyle Heights neighborhood, despite two victims testifying at his trial that he was not the robber. That trial ended with a deadlocked jury. In his second one, which led to his conviction, the witnesses were not called on by either the prosecution or the defense. He was convicted and given a 47-year prison sentence.

Since then, Martinez’s wife, a secretary for the sheriff’s department, has been fighting to get his conviction vacated. Her five appeals with state and federal courts were all rejected. In her latest attempt to free her husband, however, she and a friend, who is a retired homicide detective, convinced prosecutors to review the case. After doing so, they learned that Martinez had been at work when some of the crimes were being committed.

Upon Martinez’s exoneration, Dist. Atty. Jackie Lacey apologized to the man for the “series of unfortunate and ultimately tragic circumstances” that led to his conviction.

“Mr. Martinez and his wife proved to be unstoppable in their pursuit of his freedom,” she told the Los Angeles Times. “Throughout this terrible experience, the two were never deterred by setbacks and instead demonstrated remarkable strength and dignity through what I imagine must have been a dark time in their lives.”

In 2015, Lacey’s office created a unit to review wrongful conviction claims. Martinez only marks the third case that her office has supported in the last four years. It was also the only one that had been brought to her by everyday people rather than lawyers.

Martinez, who was offered a plea deal with a 2 1/2-year sentence, said he did not regret rejecting the deal.

”I would have been standing for a lie,” Martinez said. “If it happened again, I would stand up for the truth.”

At court, he expressed gratitude to his wife and loved ones who stood by him through his imprisonment, tirelessly fighting for his freedom.

“I did not do this time by myself,” he said. ”My family did time. My wife did time with me, did the 11 years with me. I couldn’t do it on my own, on my own strength. It was God’s strength that got me through this.”