The Supreme Court ruled Thursday that Congress intended the more lenient sentences it created for crack-cocaine offenders to begin immediately, even for those who committed their crimes before the law was signed.

The court’s 5 to 4 decision settled a question that Congress seemed to leave open when it passed the Fair Sentencing Act. The law narrowed the discrepancy in punishment between those convicted of crack-cocaine violations, who tend to be black, and those with powder-cocaine offenses, who tend to be white.

Justice Stephen G. Breyer said the more lenient penalties apply to the thousands of people who violated the law before President Obama signed it on Aug. 3, 2010, but who were not sentenced until afterward.

The decision came on a day the court also made it harder for public employee unions to extract special fees from nonmembers.

The court was clearing the deck for decisions next week on two of the most important cases of the term: the constitutionality of Obama’s health-care law and Arizona’s attempt to toughen laws against illegal immigrants.

The Fair Sentencing Act changed a system that essentially treated one gram of crack cocaine as the equivalent of 100 grams of powder cocaine. It reduced that ratio to about 1 to 18, raising the amount of crack cocaine necessary to trigger mandatory sentences.

Congress did not expressly say in the new law that it applied retroactively. And an 1871 statute seemed to indicate that such an affirmative statement was required.

But Breyer said that “six considerations, taken together, convince us that Congress intended” for the more lenient penalties to apply more quickly.

Among them were a belief that Congress could not have wanted a sentencing scheme it was overturning to continue in place even for a short time; no indication that it envisioned a delay in implementing the new sentences; and a finding that a failure to use the new sentences could make the disparities worse.

Breyer was joined by Justices Anthony M. Kennedy, Ruth Bader Ginsburg, Sonia Sotomayor and Elena Kagan.

Justice Antonin Scalia said Breyer’s complicated test only pointed out that Congress did not expressly say the sentences should apply retroactively. “In the end, the mischief of the court’s opinion is not the result in this particular case, but rather the unpredictability it injects into the law for the future.”

He was joined by Chief Justice John G. Roberts Jr. and Justices Clarence Thomas and Samuel A. Alito Jr.

The two cases from Illinois are Dorsey v. U.S. and Hill v. U.S.

Union activists angered

In the union case, Kennedy joined the conservative justices to make it harder for public-

employee unions to get nonmembers to pay special fees for political action.

The case involved a unit of the Service Employees International Union in California, where all employees of an “agency shop” are represented by the union. Non-members must pay an annual fee to cover the costs relative to collective bargaining but may receive a refund of fees used for lobbying and political activities with which they disagree.

Seven justices found that the SEIU did not properly give non-members a chance to opt out of a special fee in 2005. But the conservative members of the court said nonmembers should not have to pay the fees unless they opt in for the political spending.

“This aggressive use of power by the SEIU to collect fees from nonmembers is indefensible,” Alito wrote for the majority, calling it an intolerable impingement on First Amendment rights.

Sotomayor agreed that the union did not take proper steps in collecting the fee. But she said her colleagues went far beyond what was required by implementing the “opt-in” requirement, which she said had not been addressed in briefs and oral arguments.

“The majority breaks our own rules and, more importantly, disregards principles of judicial restraint that define the court’s proper role in our system of separated powers,” Sotomayor wrote.

Conservative activists said the majority was defending the rights of those in states where nonmembers were required to be represented by a union. But union activists were livid.

“Unfortunately this decision continues the attack on the right of public-sector workers to act collectively to impact their workplace on important issues,” said Jim Herron Zamora, spokesman for SEIU Local 1000.

The case is Knox v. SEIU.

Deciding maximums

Twelve years ago, the court ruled that juries, rather than a judge, must determine facts that can increase a defendant’s maximum potential sentence. On Thursday, it extended that same rule to companies facing criminal fines.

The ruling came in the case of a natural gas distributor that owned a company that stored mercury at a facility in Rhode Island. When the hazardous material found its way into the community, Southern United faced a fine of $50,000 per day. A jury convicted the company and a judge fined it $18 million.

But the company appealed, saying the jury had not determined the actual length of the company’s violation, and thus the fine was too high. The U.S. Court of Appeals for the 1st Circuit said a judge could make that determination, because the same rules that applied to criminal defendants did not apply to companies facing criminal fines.

Sotomayor wrote the 6 to 3 ruling that disagreed. “While the punishment at stake” is different, she wrote, “we see no principled basis . . . for treating criminal fines differently” than imprisonment or a death sentence.

The case is Southern Union v. U.S.