BOSTON (AP) _ A judge's decision to dismiss a drug charge against a woman whose baby was born with cocaine in its system should discourage similar prosecutions of pregnant women, a lawyer involved in the case said Wednesday.

The decision was the first in the country to validate a woman's constitutional privacy rights in such cases, said Nancy Gertner, a Boston lawyer who represented 20 groups interested in the case. Among them was the American Civil Liberties Union.

Plymouth Superior Court Judge Suzanne DelVecchio on Tuesday dismissed a drug distribution indictment against Josephine Pellegrini, a 24-year-old Brockton woman. Prosecutors charged Pellegrini when it was discovered her infant son, Nathan, was born with cocaine in his body.

''It's not that a woman has a right to take cocaine and abuse her own body,'' Gertner said, explaining Pellegrini's defense. ''What the state can't do is seek to use her status as a pregnant woman for additional penalties.''

DelVecchio's ruling has no authority outside Plymouth County. But Gertner predicted the 19-page decision will sway judges in Massachusetts and elsewhere.

''Whenever a judge ventures into a new area and writes something this thoughtful, it makes a difference,'' Gertner said.

''There is no familiar bond more intimate and more fundamental than that between the mother and the fetus she carries in her womb,'' DelVecchio wrote. ''This court will not permit the destruction of this relationship by the prosecution.''

Pellegrini was indicted by a Plymouth grand jury in September 1989 on charges of distribution of cocaine to a minor and cocaine possession. Based on the boy's medical records, authorities determined Pellegrini must have ingested cocaine shortly before Nathan's birth.

District Attorney William O'Malley said he pursued the case to discourage pregnant women from drug abuse.

But DelVecchio said education, drug treatment and medical care are better alternatives.

''By imposing criminal sanctions, a woman may turn away from seeking prenatal care for fear of being discovered,'' she wrote.

Geline Williams, the assistant prosecuting the case, said her office has not decided whether to pursue the Pellegrini case further.

Williams argued the case fell under legal precedents for charging third parties with murder or manslaughter in the death of a viable fetus when a pregnant woman is injured or killed.