CHICAGO (AP) — A Chicago-based appellate court has ruled that suspects have clear rights to represent themselves and that judges don’t have wide latitude to withhold those rights.

The Chicago Daily Law Bulletin reports the ruling came in the case of convicted killer James Freeman. The 7th U.S. Circuit Court of Appeals said he’d been wrongly denied his request to represent himself at trial.

Cook County jurors convicted him of kidnapping and first-degree murder in 2009 in a drug dealer’s death. He received a 60-year prison term. The ruling posted Wednesday says Freeman should be retried or released.

It said the right to self-representation belongs to all defendants as long as they’re mentally competent and can “intelligently waive the right to counsel.” It added Freeman’s lack of education didn’t itself undercut that right.