The Virginia Supreme Court ruled yesterday that Stafford County authorities violated state law by prosecuting a teenager without notifying both his parents, a decision that could force officials to retry hundreds of juveniles convicted of offenses from petty theft to murder.

In a unanimous decision, the court upheld a lower-court ruling granting a new trial for Jeramie Baker, who was convicted of stabbing a convenience store clerk in 1996, when he was 17. The state's highest court found that although the Stafford sheriff's office told Baker's mother about her son's arrest, authorities did not try to contact the teenager's father, who had left the family when Baker was 4 years old.

The Baker case prompted the General Assembly to change the law this year, and beginning July 1, authorities will be required to notify only one parent rather than both.

But the new law will not apply to earlier cases, and several prosecutors said they fear that many juvenile offenders now will seek to have their convictions thrown out.

Until the issue was raised by Baker's attorney, most law enforcement agencies had assumed it was sufficient to contact one parent of a juvenile suspect, especially in cases where the suspect was living in a single-parent home.

"It's not good news," said Loudoun County Commonwealth's Attorney Robert D. Anderson. "At least the legislature was good enough to change the law, but it doesn't help us now."

Even before the Supreme Court's ruling yesterday, a Centreville man convicted of murdering two men in Loudoun in 1994 raised the issue in a petition filed in March. The defendant, David Allen Moore, who was 16 at the time of the killings and is serving two life sentences, argues that Loudoun authorities who arrested him never attempted to notify his father, who was in prison at the time.

It is unclear how many cases ultimately could be affected, but in his argument to the Supreme Court in the Baker case, Assistant Attorney General Michael T. Judge wrote that upholding the reversal of Baker's conviction "could invalidate thousands of felony convictions."

In the last fiscal year alone, 46 percent of the 1,680 juveniles sentenced in Virginia were from single-parent homes, according to state figures.

"We're looking into a very cloudy crystal ball in trying to assess how many cases will be brought back," said Robert E. Shepherd Jr., a University of Richmond law professor and former chairman of the American Bar Association's juvenile justice committee. "I know the attorney general in his brief said we're looking at thousands, but as a practical matter it's probably hundreds. It's just so hard to predict."

Several Northern Virginia defense lawyers said they already have begun reviewing their old files to see which cases might be affected. They said they are most likely to appeal convictions in serious felony cases where juveniles are incarcerated.

"I think there's certainly an ethical obligation for attorneys to look back in their files and see who it might impact," said Leesburg defense lawyer Alex Levay. "I think it's obvious if you have a client who is incarcerated or under some type of restraint of liberty. But it also applies to kids who have a mark on their record and want it expunged."

The old law required authorities making a juvenile arrest to send a court summons to the youth's "parents, guardian, legal custodian or other person standing in loco parentis." If they could not locate a parent, they were required to convince a judge that they had made the attempt.

Anderson and other prosecutors said that if other convictions are overturned because of the parental notification issue, they will decide on a case-by-case basis which juveniles to retry. They said that in a case involving a minor offense, a retrial might not be worth the resources it would consume.

"I'm keeping my fingers crossed," said Arlington County Commonwealth's Attorney Richard E. Trodden. "It is truly one of those situations where form has been elevated over substance. If the goal here is justice, this set of cases doesn't enhance it."

Some defense lawyers said they are less likely to challenge convictions in cases where youths already have served their sentences, because a retrial could result in a more severe penalty. But they said some defendants convicted of less serious crimes may want to try to have their records cleared.

"Given the fact that juvenile records are no longer as confidential as they used to be, there may be some parents who, for their kids, want a Baker-type attack to be pursued," said Fairfax defense lawyer Peter Greenspun.

Warrenton defense lawyer Paul Morrison said the decision of whether to seek a reversal may come down to money. "For the majority of cases, I doubt very seriously it will be financially viable for them to go back into court because you're talking attorney's fees," he said.

Baker's attorney, Clifford Y. Rose, said his client, who was originally convicted of unlawful wounding and attempted robbery, is now risking a tougher punishment if he is retried.

"In his case he received a three-year, four-month sentence, but now he's open to up to 20 years," Rose said.