Updated

The Supreme Court (search) on Thursday struck down a Michigan law that barred state-paid legal help for poor defendants who plead guilty but then want to appeal.

The one-of-a-kind law had been challenged by Antonio Dwayne Halbert (search), who pleaded no contest in 2001 to two child molestation charges and received up to 30 years in prison.

He wanted a state-appointed lawyer to help him contest the way his sentence was calculated.

But Michigan's 1994 law, designed to clear a backlog of thousands of cases, barred automatic appeals for defendants who plead guilty or no contest. There are some exceptions, including if a prosecutor seeks an appeal.

Those defendants may ask the Michigan Court of Appeals (search) for permission to appeal, but that request is seldom granted.

Justice Ruth Bader Ginsburg, writing the 6-3 decision, said that Halbert had a right to an attorney.

"Navigating the appellate process without a lawyer's assistance is a perilous endeavor for a layperson, and well beyond the competence of individuals, like Halbert, who have little education, learning disabilities, and mental impairments," she wrote.

Had justices upheld the law, other states likely would have copied it as a way of cutting back appeals and unclogging courts. Seventeen states filed arguments supporting Michigan.

Opponents argued that the law discriminates against the poor.

Justice John Paul Stevens, during arguments in the case, had said that defendants are not always represented at trial by able attorneys.

"If that counsel happens to be incompetent, that's the end of the ball game," Stevens said.

The 17 states supporting Michigan were: Louisiana, Alabama, Colorado, Hawaii, Indiana, Maryland, Mississippi, Montana, Nevada, Ohio, Oklahoma, South Carolina, South Dakota, Tennessee, Texas, Utah and Washington.

The case is Halbert v. Michigan, 03-10198.