DETROIT (AP) — The Michigan Supreme Court was urged Wednesday to strike down a law that forces people convicted of crimes to pay millions of dollars for the everyday costs of running local courts.

The challenge comes at a key time: The law expires in October, and a decision from the Supreme Court would affect how the Legislature responds.

READ MORE: 'Stop the Violence': Detroit Police Officers Host Basketball Game To Promote Peace At Schools

Critics say it’s unconstitutional for a judge to oversee a criminal case and also have the power to order someone to pay a share of keeping the lights on, the building clean and office supplies stocked.

The money goes to a court’s local government, but only people convicted of crimes must pay, not others who use the courts. Nothing is deducted from the budget of prosecutors who lose cases.

“The important conflict of interest here is the fact that judges, when imposing sentence and deciding whether to impose court costs, have to factor in this fundraising element,” said Angeles Meneses, an attorney for Travis Johnson, who is challenging $1,200 in fines in Alpena County.

“They have to think about the finances of the very court over which they preside. … It’s incredibly problematic,” Meneses told the Supreme Court.

From 2018 through 2020, courts collected $108 million statewide, 75% of it in District Courts, which handle traffic tickets, drunken driving cases and other misdemeanors mostly committed by people who can least afford to pay.

Costs can vary by community. Some judges don’t order them.

READ MORE: Detroit Retiree Sees Sidewalk Repaired Months After Water Main Break

For example, in Newaygo County in 2020, an average of $158 was assessed in 1,301 District Court cases. But nearby in Lake County, the average was $42 in 1,458 cases.

A statewide association of District Court judges is in favor of striking down the law.

Chief Justice Bridget McCormack said her concern is an “appearance of bias,” not actual bias by local judges.

If the law was explained in easy terms to the public, “don’t you think most people would say, ‘Wait a minute? That doesn’t sound right,’” McCormack said.

Justice David Viviano, a former Macomb County judge, said some courts are ordering costs that are hard to justify. But he questioned whether it means the “whole system is unconstitutional.”

In defense of the law, Assistant Attorney General Linus Banghart-Linn said it was a policy decision made by the Legislature.

“Not one dollar goes into the pocket of the judge,” he said.

MORE NEWS: GOP Michigan Governor Candidate Ryan Kelley Says COVID Policies At Debate A 'Dealbreaker'

© 2022 Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.