It was, by all accounts, the juiciest scandal to hit St. Mary's County since Jeanne Blakistone Dorsey, the county prosecutor's former wife, took up with Maryland governor Marvin Mandel.

An eight-month undercover drug investigation had netted 39 suspects, the largest local bust in memory. And the biggest fish was Dr. Patrick H. Pierce, a 44-year-old dentist with the public image of a family man active in civic affairs, but who privately had a penchant for alcohol, cocaine and illicit sex.

He was, in the words of Kenneth M. Robinson, the flamboyant Washington lawyer Pierce hired, "a wild-running, sex-crazed lunatic" who reveled in heart-shaped Jacuzzis in the Pennsylvania Poconos and was entrapped by unscrupulous law enforcers with possible political motives.

Having treated 9,000 local patients, Pierce had been at one time or another the dentist of choice for one of every six county residents, and he regularly sent his dental technicians into the public schools to put on puppet shows for the children about dental hygiene. Even a local judge, Joseph A. Mattingly, was a patient and the judge's wife had helped arrange the purchase of Pierce's home. Robinson was successful in getting Mattingly removed from the case to avoid a conflict of interest.

But in this largely rural county of 60,000 steeped in the Catholic faith, the jurors found Pierce guilty of distributing marijuana, cocaine and methamphetamine.

Today, Pierce, wearing a Santa Claus tie and a cross-and-dove lapel pin on his blue blazer, stood before Circuit Judge Perry Bowen, a tough-talking country judge from nearby Calvert County, and was sentenced to three years of incarceration starting Jan. 3. The judge said the sentence could be served in a work-release program fixing the teeth of the poor.

The sentence was strikingly more lenient than those meted out by Mattingly in the other drug cases. A St. Mary's College freshman from Hyattsville received nine years, a sentence being appealed.

By way of explaining his sentence today, Bowen called Pierce a "go-fer. You decided to split some stuff you bought with a friend. If I thought otherwise, I'd sentence you to a full 20 years. You just got carried away with being a good guy, with your judgment impaired by too much boozing and drugs . . . ."

Several lawyers and others in this small county said the case was a tragedy, a word Pierce himself used. "All of these people know me," he said after the sentencing. "I'm probably the best known . . . That's why it's such a tragedy." He had, he told Bowen, violated the trust of "my family . . . the community I lived in."

Walter Dorsey, a former state senator and the current state's attorney who prosecuted the case, knew him well. Dorsey's son, Phillip III, 28, had been a patient of Pierce's since he was 10, and Phillip Dorsey and Pierce had also become personal friends.

Pierce's legal trouble began when an undercover deputy sheriff visited Pierce's home March 18 and, according to testimony, bought several drugs from the dentist, including three grams of cocaine.

On March 23, the prosecutor charged, Pierce delivered cocaine to the undercover officer and on April 9 he sold the officer some methamphetamine.

Pierce testified at his trial that he turned down the undercover officer "at least 10-12 times. He wouldn't leave me alone. He called me two, three, four times a day."

Pierce was arrested Friday, April 13, immediately creating a sensation. But the trials of the other suspects came first. One by one, the defendants fell like dominoes, with one jury reaching a verdict in 12 minutes and Judge Mattingly, who was sentencing the group, living up to his reputation for being rough on drug offenders, as the local paper put it.

But Pierce put up a fight. He hired Fred Joseph, a Prince George's County civil liberties lawyer, to argue constitutional issues, and Robinson, the Washington attorney who has represented, among others, former South Carolina congressman John Jenrette who was convicted in the Abscam case, to dazzle the jurors.

The four-day trial packed the courtroom. Gwen Pierce, the dentist's wife, and Pierce's girlfriend sat side by side as the case unfolded. Pierce's defense was simple. He was, Robinson argued, more victim than criminal, a sick man who testified that he had had a cocaine habit since 1980. He wanted to be everyone's friend, Robinson said, and thus he was easy prey for entrapment.

The undercover officer, testimony showed, had plied the dentist with liquor. The defense tried to discredit the man, a former Frostburg, Md., officer, noting his 1982 Department of Natural Resources conviction and fine for having five deer carcasses and distributing venison steaks to friends.

Two witnesses for the defense contended the officer had smoked marijuana, distributed pep pills and had sex with two go-go dancers. The officer has denied the allegations, but declined yesterday to discuss the case. The defense also suggested Pierce was targeted for political reasons. He had supported Joseph Lee Somerville, the former sheriff unseated by Wayne Pettit. The narcotics undercover officer worked for Pettit.

Prosecutor Dorsey punctuated his closing argument with references to his own family's long lineage in the county, creating a common bond with the jurors.

It took the jury three hours to convict the dentist, knocking him from heights it had taken years to reach. From a modest Baltimore background -- his father taught shop for 40 years in public schools -- Pierce had attended Jesuit schools, graduated from the University of Maryland Dental School and moved in 1968 to St. Mary's to practice.

"At one time, I had a staff of 10, 12 people and three secretaries," he said yesterday after the sentencing, his voice trailing off. His father said that Pierce worked 14 hours a day to keep up with all the patients, and suggested that overwork was one reason for Pierce's cocaine habit, which the prosecutor said cost him about $35,000 a year.

After the arrest, Pierce's home burned down. His patients largely deserted him. In a local newspaper, Pierce decried "the unforgiving nature of this community."

Today, only a few people were on hand for the sentencing: his wife and father, his lawyers and their investigator, the Baltimore priest who runs the mission where Pierce will work, and a few spectators.

"I would just like to live my new life free of alcohol and drugs," Pierce told the judge, "and continue on the path I'm now on . . . ."

Though he says he has been drug-free and alcohol-free for eight months, Pierce is still under investigation for Medicaid fraud. An investigator for Blue Shield in Baltimore said he is reviewing "unusual billings." Pierce said, "I've never intentionally cheated anyone."