After serving nearly nearly two decades in prison for a 2000 murder, a South Side man has won a new trial.

Xavier Walker had several alibi witnesses ready to testify that he was at home when Mark Madjak was gunned down in West Garfield Park. Walker, then only 19, also had a witness whom he’d told police had beaten him before he confessed, as well as photographs showing his injuries.

But none of that evidence was brought out by his lawyer at the time, and Walker received a 35-year prison sentence for murder. On Tuesday, State’s Attorney Kim Foxx’s office agreed to vacate his conviction and 35-year sentence, though Walker remains at the Cook County Jail on a no-bond order from Judge Alfredo Maldonado.

Assistant Public Defender Harold Winston said Tuesday that he did not know whether prosecutors intend to take the case to trial again, but he said that he’s confident the evidence will show Walker is not guilty.

“He was innocent,” Winston said. “There were alibi witnesses who were with him the whole night who simply were not called.”

Madjak was shot dead in the 4700 block of West Ohio around 1:10 a.m., but according to affidavits from Walker’s older sister, he was at home until nearly 2 a.m. that night because she wouldn’t let him borrow her car until after most bars had closed.

Another sister, however, overheard a phone call in which a friend called to tell Walker that a mutual friend, Walker’s future co-defendant, Jovanie Long, was in trouble. Long was also convicted, and is serving a 45-year sentence.

After Walker was arrested, he told a volunteer lawyer at the police station that he had been punched and slapped by the officers who interrogated him. A witness who was in an adjacent interrogation room claims he heard the sounds of a struggle in Walker’s room, according to his motion for a new trial.

A witness who implicated Walker in the crime recanted his testimony at trial, and also claimed he was beaten by detectives at Area 4. Without the witness’ statement, Walker’s confession was the most compelling evidence against Walker, Winston said.

The Public Defender’s Office was assigned to the case in 2007, and his latest bid for a new trial was filed in 2015.