The Supreme Court agreed yesterday to settle whether federal rules for sentencing criminals violate the Constitution, a question that has thrown federal courthouses into disarray this summer.

The court said it will hear two cases suggested by the Bush administration just weeks after the court ruled major portions of a state sentencing system unconstitutional.

That system in Washington state, like the federal sentencing system, relied on judges to make many decisions that can affect the length of a defendant's sentence. The Supreme Court ruled 5 to 4 in June that juries must decide any matter that can lengthen a sentence beyond the maximum set out in state sentencing guidelines, or the defendant must admit it.

Federal trial judges routinely make such findings as the quantity of drugs involved in a crime or whether a gun was used. Trial judges and appeals courts have divided over whether the Supreme Court's ruling in Blakely v. Washington invalidates the federal sentencing system.

The court is on its summer hiatus, but it issued a brief order to add both cases to its calendar. The court said it will hear the cases, both involving federal drug defendants, on Oct. 4, the first day of the new court term.

The Bush administration is defending the federal sentencing system. Congress authorized it two decades ago to reduce disparities among punishments handed out by different judges.

The high court has found the federal system constitutional, but that was long before the justices began to reexamine the role of judges and juries in determining facts.

A ruling four years ago overturned New Jersey rules that allowed a judge to lengthen a criminal sentence based on facts not presented to a jury. The court said then, and has since repeated, that the Constitution's guarantee of a jury trial means judges alone cannot do the work of juries.

In one of the appeals at issue yesterday, a panel of the U.S. Court of Appeals for the 7th Circuit in Chicago threw out a Wisconsin man's sentence because a federal judge decided the amount of drugs that were involved and that the man had obstructed justice.

The second case involves a Massachusetts man convicted in Maine of conspiracy to distribute cocaine and set for sentencing four days after the Blakely ruling was issued. The judge in Ducan Fanfan's case was prepared to impose a sentence of from 15 to 16 years, based in part on facts not part of the jury trial.

The judge reconsidered because of the Supreme Court case, and Fanfan was sentenced instead to about six years in prison.

The case is on appeal to the U.S. Court of Appeals for the 1st Circuit in Boston, but the administration asked the high court to skip the appeals court step and simply review the case now.

The cases are United States v. Booker, No. 04-104, and United States v. Fanfan, No. 04-105.