A Mississippi man tried six times in the same killings was freed from custody Monday after more than two decades behind bars while he faces a possible seventh trial, following a judge’s ruling Monday.

Curtis Flowers’s case has drawn national attention as four convictions have been tossed over prosecutorial misconduct, prompting concerns of bias against a black defendant. His latest conviction in a 1996 quadruple killing in a Mississippi furniture store came under review by the Supreme Court, which overturned the guilty finding in the summer as it ruled that a white prosecutor worked to keep African Americans off the jury.

Jubilant family members and supporters embraced Flowers in the packed courtroom Monday after Montgomery County Circuit Judge Joseph Loper said the defendant could leave prison on a $250,000 bond while he awaits a decision on another trial. Flowers shook his attorney’s hand, then was escorted out of the courtroom to be processed and released. He walked out of the regional jail in Louisville, Miss., later Monday.

“He’s extremely happy to be out,” Flowers attorney Rob McDuff told The Washington Post. “I think he had a sense that this was going to work out this time around.”

Flowers’s legal team is now awaiting a ruling on the motion it filed in September to dismiss the charges. So far, prosecutors have not responded in writing — a decision the judge forcefully criticized during the bail hearing. McDuff said he expects the judge to hold a hearing on the request to drop the case early in the new year.

“This has been a long and costly process, and there is no need to continue wasting taxpayer money on this misguided prosecution that has been plagued by misconduct and racial discrimination,” McDuff said.

A donor who wanted to remain anonymous paid the $25,000 — 10 percent of the bond — needed to secure Flowers’s release, according to McDuff. The attorney described the donor as a supporter who had taken an interest in the case and said Flowers knew who the person was.

Release will mean a major adjustment for Flowers, whose plans include spending time with family and decompressing after more than two decades in prison, McDuff said. He will have to wear an electronic monitor while his case proceeds.

Flowers has spent almost 23 years in prison as a campaign to free him has gained momentum, fueled in part by a podcast that delved into Flowers’s case and the history of District Attorney Doug Evans. Reporting by American Public Media raised doubts about the evidence against Flowers and portrayed Evans as a prosecutor willing to disregard a defendant’s rights in order to solve a heinous crime.

He was charged with executing four people inside Tardy furniture Store, where he had worked briefly, in the small town of Winona, Miss. The victims were Bertha Tardy, 59, and store employees Carmen Rigby, 45, Robert Golden, 42, and Derrick “Bo Bo” Stewart, 16.

Analyzing Evans’s attempts to remove people from juries between 1992 and 2017, American Public Media found the prosecutor turned to “peremptory strikes” — moves to cut someone without explanation — half of the time for eligible black jurors. Evans’s office did the same for white jurors just 11 percent of the time, the news organization discovered.

Two of Flowers’s trials, the only ones with more than one African American assessing his guilt, ended in hung juries.

Dismissing Flowers’s sixth conviction and death sentence in a 7-to-2 decision, the U.S. Supreme Court noted that Evans struck 41 of 42 black prospective jurors. Writing for the majority, Justice Brett M. Kavanaugh decried the “state’s relentless, determined effort to rid the jury of black individuals.”

That effort “strongly suggests that the state wanted to try Flowers before a jury with as few black jurors as possible, and ideally before an all-white jury,” Kavanaugh wrote.

After the ruling, Evans told American Public Media that “there’s no question about [Flowers’s] guilt” and “never has been.”

“Courts are just like me and you,” he said. “Everybody’s got opinions.”

Assistant District Attorney William Hopper declined to answer a question about whether his office would try Flowers again, according to the Associated Press.

The Washington Post could not immediately reach the district attorney’s office for comment.

Robert Barnes contributed to this report.