OTTAWA -- The Supreme Court of Canada says the provinces, not trial judges, should set the rate of pay for lawyers appointed to represent accused people as so-called "friends of the court."

The court ruled by a narrow 5-4 margin in a case that has implications for the cases of accused people who chose to represent themselves in court, an irritant for the justice system.

The court was ruling on three Ontario cases where lawyers had been appointed as to assist accused people who chose to represent themselves.

Criminal lawyers had argued that they should be paid more than the standard legal-aid rate to do this work.

The decision overturned an earlier Ontario Court of Appeal ruling that allowed judges to set the rate of compensation and the monitoring of accounts.

The court also ruled that in extreme cases where the parties cannot agree on the rate of pay, the trial judge has right to institute a stay of proceedings.