By Sara Powers

DETROIT (AP) — A Detroit man who spent 48 years in prison for a fatal robbery pleaded no contest to second-degree murder Tuesday in an extraordinary compromise that settled his claim of innocence and allowed him to go free.

Ray Gray, 69, wasn’t exonerated during the video court hearing. But the deal erased his previous first-degree murder conviction and life sentence, and immediately qualified him to go home for the first time since he was 21.

READ MORE: 'Our Pure Michigan Summer Is Back,' Whitmer Officially Announces Mask Mandate, Some COVID Restrictions Lifted

In this photo provided by Bill Proctor, Ray Gray and his wife Barb Gray pose for a photo after he was released from a state prison in Muskegon, Mich., on Tuesday, May 25, 2021. Gray was in prison for 48 years for the fatal shooting of a man in Detroit in 1973. He has long maintained his innocence and provided new evidence in March, 2021. Gray was not exonerated, but prosecutors agreed to drop the conviction in exchange for a no-contest plea to second-degree murder. He was sentenced to time served. (Photo courtesy of Bill Proctor via AP)

Gray seemed overwhelmed about his next turn, rubbing his forehead and crying softly as Judge Margaret Van Houten ended the Zoom hearing in a Detroit courtroom. A mask dangled from his right ear.

“This is a happy day,” Gray told the judge from prison 200 miles (320 kilometers) away. “Sometimes justice is blind, and sometimes justice is hard of hearing. But if you touch justice, sometimes it works. And so, this time, the system worked. I’m appreciative.”

He walked out a few hours later.

Gray was convicted of first-degree murder in 1973 in the fatal shooting of a drug dealer in Detroit. He went from arrest to a life sentence in just three months; the trial lasted less than three days.

For decades, he has challenged the conviction with claims of his innocence. Gray said he knew Ruben Bryant but wasn’t present when Bryant was killed. His latest filing in March revealed that a witness to the robbery now says two other people were responsible.

But another witness still insists it was Gray who was the gunman, a conflict that the Wayne County prosecutor’s office felt it couldn’t ignore.

READ MORE: Whitmer Announces Plan To Expand Tuition-Free College To 22,000 Additional Michiganders

Prosecutor Kym Worthy, however, agreed to set aside the original conviction and allow a no-contest plea to second-degree murder. Gray did not admit guilt but did not contest the charge. His nearly 50 years in prison amounts to enough time served on the new conviction.

“We wish him well,” Worthy said.

Gray’s attorney, Gabi Silver, told the judge that the result of the ’73 trial has been frequently challenged over four decades.

“I am really grateful and happy for Ray,” Silver told the judge. “He will get to have some life in the world with his family and his wife.”

Valerie Newman of the prosecutor’s office, who looks at wrongful conviction claims, said the victim’s brother, Marvin Bryant, had no objection to the deal with Gray.

“Of course, he misses his brother terribly,” Newman said. “He also thinks that Mr. Gray, even if he was the perpetrator, has done more than enough time.”

MORE NEWS: July 4 Celebrations: Here's A List Of Fireworks Shows Happening In Metro Detroit

© 2021 Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.