The federal court system has been plunged into turmoil in the wake of a Supreme Court ruling that casts doubt on the constitutionality of U.S. sentencing guidelines, and prosecutors and defense lawyers say that tens of thousands of ongoing criminal cases may be affected.

The court, in a 5 to 4 decision, ruled June 24 that Washington state's sentencing guidelines were unconstitutional because they allowed a judge, rather than a jury, to consider factors that increase a defendant's criminal penalty.

At least a half-dozen U.S. District Court judges have since ruled that because Washington state's system resembles the federal one, the high court's decision in Blakely v. Washington makes part or all of the U.S. sentencing guidelines unconstitutional.

The issue has already produced two seemingly contradictory rulings at the appellate level. The U.S. Court of Appeals for the 7th Circuit issued a 2 to 1 decision last week declaring part of the federal sentencing system unconstitutional, and yesterday morning, the 5th Circuit reached the opposite conclusion. Hours later, judges in the 2nd Circuit took the unusual step of issuing a set of three questions for the Supreme Court and urging it to "adjudicate promptly the threshold issue of whether Blakely applies to the federal sentencing guidelines."

Also yesterday, a federal judge in Brooklyn, N.Y., scheduled what may be the first federal jury trial convened solely to decide on a defendant's sentence. The Senate Judiciary Committee is to hold a hearing today to debate possible action by Congress.

The Justice Department has responded with a new set of procedures aimed at navigating the shifting legal landscape, including orders to aggressively pursue "Blakely waivers" under which defendants agree, as part of a plea bargain, not to use Blakely to challenge their sentences.

U.S. District Judge Leonie M. Brinkema in Alexandria has already informed prosecutors and the public defender's office, however, that she will not accept such waivers until there is guidance from a higher court on their constitutionality.

In many districts, plea bargains have nearly ended. Prosecutors across the country have rushed to add aggravating factors to be considered at sentencing to all pending and new indictments, including that issued last week against former Enron Corp. chairman Kenneth L. Lay. Defense attorneys, meanwhile, are flooding U.S. district courts with requests for new and reduced sentences.

"Blakely is like an earthquake," said Douglas Berman, an Ohio State University law professor. "Twenty years of investment in structured sentencing has essentially come crashing down. . . . They're trying to figure out which parts have come down and how to put them back up again."

Steven Chanenson, a Villanova University law professor and former federal prosecutor, called it "a big mess that needs to be resolved. . . . It injects an enormous amount of uncertainty into a system that, whether you liked it or didn't, was relatively stable and predictable."

Under federal sentencing guidelines developed over the last two decades, a complicated, points-based system requires a judge to set a sentence based on "aggravating" factors not considered by a jury during a trial, such as whether a gun was used during a crime or whether the defendant played a leadership role in a criminal organization. Nearly all federal prosecutions include such factors, but Blakely calls into doubt that regimen by mandating that a jury must decide the facts of any issues that would increase a defendant's statutory sentence.

The ruling's effect on federal sentences is already palpable. Dwight Watson, the North Carolina farmer who drove his tractor onto the Mall and threatened to set off a bomb in 2003, was one of the first beneficiaries. He was sentenced to time already served and ordered freed because a judge decided he could not add extra jail time under Blakely.

Other fortunate defendants have included a drug dealer in Maine, whose prison time was cut from 19 years to six. In West Virginia, U.S. District Judge Joseph R. Goodwin ruled that Blakely required him to knock 19 years off a 20-year prison sentence for Ronald Shamblin, who had pleaded guilty to methamphetamine charges. The judge said neither alternative was just.

"Shamblin's case illustrates the upheaval that Blakely will cause in federal courts, at least for a time," Goodwin wrote in an impassioned ruling June 30. "At 240 months, Shamblin's sentence represented much that is wrong about the Sentencing Guidelines; at 12 months, it is almost certainly inadequate. My duty, however, is only to apply the law as I find it."

The Justice Department's official position is that Blakely does not apply to federal sentencing guidelines, but it nonetheless is preparing prosecutions as if the ruling does apply. In a memo issued July 2, Deputy Attorney General James B. Comey wrote that until the Supreme Court rules on Blakely's impact on sentencing guidelines, prosecutors should "safeguard against the possibility of a changed legal landscape."

Under the strategy, federal prosecutors have begun adding "readily provable" aggravating factors to indictments and have been told to "immediately seek to obtain plea agreements that contain waivers of all rights under Blakely."

One senior Justice official said: "It's fair to say [Blakely] will have a cataclysmic effect on what federal prosecutors do, at least in the short term. . . . This is the single most profound constitutional ruling many of us have seen in our careers."

The ruling is a boon to defense attorneys because it dramatically lessens the substantial leverage that federal prosecutors have gained over defendants in recent years. "We believe we have before us an opportunity, unprecedented since 1984, to create a truly just and rational federal sentencing guidelines scheme," E.E. Edwards and Barry Scheck of the National Association of Criminal Defense Lawyers wrote in a letter to Attorney General John D. Ashcroft and the administrative chief of the U.S. federal courts.

An Alexandria case illustrates the complications prosecutors are likely to face under Blakely. Wing Oi Yuen was charged in a one-count indictment with money laundering in connection with the activities of the Washington-based branch of an Asian organized crime group.

The judge would normally determine Yuen's sentence by deciding if aggravating factors were proved by a "preponderance of the evidence" rather than the stricter "beyond a reasonable doubt." After Blakely, however, prosecutors inserted new language into a proposed plea agreement that would have required Yuen to waive his right to have the factors determined by a jury beyond a reasonable doubt, according to his attorney, Alan Yamamoto.

In effect, the government was seeking to allow the judge to determine the sentence in the same way judges had before the Supreme Court decision.

Although Brinkema did allow Yuen to waive his right to have a jury make the determination, "she said you cannot waive the 'beyond the reasonable doubt standard,' '' Yamamoto said. In the final plea agreement, the government relented.