The Cook County state’s attorney’s office agreed Wednesday to conduct DNA tests on blood and hair found on the body of a young boy murdered more than two decades ago.

Mark Maxson was sentenced to life in prison in 1994 for killing a 6-year-old boy on the South Side. Maxson had previously been convicted in the gang rape of a woman.

At the sentencing in the murder case, Judge Daniel Locallo said Maxson treated Lindsey Murdock, a first-grader in the Roseland neighborhood, like a “piece of garbage.”

Maxson was convicted of beating, sexually assaulting and choking Lindsey, who also was stabbed with broken glass before his body was dumped under debris in an abandoned garage in 1992.

At his sentencing, Maxson told the court that Chicago Police detectives coerced his confession and he was represented by incompetent public defenders. He also said the jury misunderstood the evidence.

“All of the evidence belonged to someone else,” he said at the time. “I am charged with a crime I did not commit.”

Maxson, now 53, continues to insist he’s innocent. His attorneys, Elliot Zinger and Larry Dreyfus, have persuaded the Conviction Integrity Unit of the state’s attorney’s office’s to perform DNA tests on the evidence from Lindsey’s murder.

Maxson’s lawyers argued that DNA testing was unavailable before his trial in 1994. Police had conducted a blood-enzyme test that excluded Maxson, but the test didn’t identify a possible offender, his attorneys argued in a court filing last year.

Tests of the victim’s blood-soaked clothing contained blood from an unidentified person, but not from Maxson or the victim, his attorneys wrote. They added that a pubic hair and other hair on the victim also were from an unidentified person — and not Maxson or the victim.

The weapon, a shard of glass, didn’t have Maxson’s fingerprints on it, his attorneys noted. The state’s attorney’s office has agreed to do DNA tests on the blood and hair and re-test the glass for fingerprints, according to Zinger.

DNA testing could identify the real killer, Zinger said.

Wednesday’s hearing was held before Judge Thaddeus Wilson.

“As part of our commitment to conviction integrity, we have been open to retesting,” said Sally Daly, a spokeswoman for Cook County State’s Attorney Anita Alvarez.

Last week, Maxson’s attorneys persuaded Presiding Criminal Court Judge Paul Biebel to transfer the case from to Wilson from Judge Neera Walsh.

Zinger said Walsh was close to Judge Timothy Joyce, who was an assistant state’s attorney who took Maxson’s confession more than two decades ago.

“I’m not saying Judge Walsh would be unfair,” Zinger said, but the switch to Wilson removes the appearance of a conflict.

“I feel we are on a fair playing field now,” Zinger said, adding that he does not think Wilson and Joyce have a close relationship.

Zinger said he hopes the Chicago Police Department will locate the evidence in the case by the next hearing in April. Then the Illinois State Police crime lab can begin the testing.

“I don’t know why this guy is still in jail,” Zinger said. “Twenty-three years in prison is a long time to be behind bars for a crime you didn’t do.”

Alvarez started the Conviction Integrity Unit in 2012 to review cases involving questionable convictions. More than 350 cases have been reviewed and 10 individuals’ convictions have been vacated, according to the office. About 170 investigations remain open and the rest of the cases have been closed.