A man who has been behind bars for close to 19 years for the murder of a Bedford woman has been released after serious concerns have been raised about his trial and conviction.

John Nolley, 42, was found guilty of murder in 1998 related to the stabbing death of Sharon McLane.

Sources close to the case tell News 8 an agreement was reached between Nolley's legal team and the Tarrant County District Attorney's Office for his release on a personal recognizance bond because of issues with a key state witness, as well as the withholding of evidence.

That agreement came through Tuesday morning during a hearing in Tarrant County. Nolley entered a packed courtroom to cheers from elated family members. After thanking his attorneys, Nolley was released.

"This is a good example of exactly what we set out to do with our Conviction Integrity Unit," Criminal District Attorney Sharen Wilson said. "This case is not an exoneration. It is an example of how both changes in forensic technology and flaws in the process can lead to the potential for different conclusions with the passage of time.

"It has been our goal with the CIU that should we discover any errors, we be committed to finding a solution to prevent future occurrences. To prevent a reoccurrence of this issue, we are creating a detailed new policy on the use of jailhouse informants."

Gary Medlin, who was Nolley's court-appointed attorney, said the entire thing "has taken way too long" and that it's time Nolley be let go.

"I didn't even think it would be a conviction [at the time]," he told News 8 on Sunday. "If I'd been given all the material we would've won."

Lawyers from The Innocence Project were also at the hearing Tuesday in the 213th District Court, where Judge Louis Sturns signed off on Nolley's release.

Details on what allegedly went wrong during the first trial are expected to become public on Monday.

Nolley was arrested by Bedford police in 1997, months after McLane was found stabbed to death.

One source said a lot of the issues stem from a "jailhouse snitch" witness that prosecutors used during the subsequent trial.

Evidence release orders signed by Judge Sturns last July, and also last month, indicate DNA testing of items like a "bloody" note, and cans and bottles, has also been occurring at the request of the DA's office.

The District Attorney's office would only say that it has been working with the organization on the case and that more details would be available Monday.

Earlier this year, News 8 interviewed Dawn Boswell, the head of Tarrant County's Conviction Integrity Unit. She wouldn't discuss specific cases but emphasized the importance of the county establishing the unit.

"It seemed very natural to me that a conviction integrity unit here would be progressive," she said. "I think the public knows nothing is error free. I think what erodes their confidence is when we're not willing to look at things carefully, when we're not willing to be transparent."

The unit was established shortly after current District Attorney Sharen Wilson took office.

Medlin said he has been working on the case with attorneys from the Innocence Project for some time.

Other men freed by the efforts of The Innocence Project were there on Tuesday to show solidarity with Nolley.

Although out of prison, Nolley will not be exonerated until a separate process is conducted by the courts to determine his actual innocence. That can take months, or even years.