Maurice Fridie seemed headed for prison the steamy night of Aug. 20, 1983, when two undercover U.S. Park Police officers spotted him trying to sell drugs to the crowd jammed into the Fort Dupont Park summer theater.

The asthmatic, 110-pound drug peddler, who limped from a childhood spinal injury, was carrying 20 tins of PCP-laced marijuana in a Tupperware container as he shouted "Loveboat" to the spectators who had gathered for a Roy Ayers concert, police said.

For Fridie, who already had been convicted of selling drugs, the city's new mandatory sentencing law appeared to offer no way out. Because of a provision targeting repeat offenders, he would have to receive a minimum prison term of 20 months. The judge would have no discretion.

But Sol Rosen, Fridie's court-appointed attorney and a fast-talking fixture of the city's courts, was soon huddling with prosecutor Donald Allison, working out a deal.

Fridie would plead guilty to possession with intent to distribute PCP. In exchange, prosecutors agreed to withhold papers informing the court of his previous drug conviction. The deal enabled Fridie to qualify for an exemption in the law allowed only to narcotics addicts who are first-time offenders: drug treatment instead of prison time.

When Fridie stepped before Judge Joseph M.F. Ryan for sentencing, it was as if a significant part of his past had disappeared. Ryan placed him on probation to enter the Second Genesis drug treatment program. Today, Fridie, now 30, pushes a vacuum cleaner at a furniture store in Georgetown.

"Everybody gets together. You sit down and you work out a deal," defense lawyer Rosen said nonchalantly of the plea bargaining that flourishes in Superior Court.

Despite voters' passage of a mandatory sentencing law for drug offenders in 1982, plea bargaining that often circumvents the new law remains the primary method of moving cases through the system. A two-year Washington Post study of the impact of mandatory sentencing found that the objectives of prosecutors and judges frequently clashed with the law's call for certain prison terms of predetermined length.

The sentencing law has not limited plea bargaining and the courts have not become clogged -- as some had predicted -- with the cases of defendants who go to trial because they feel they have nothing to lose. Nor has mandatory sentencing, as its framers intended, eliminated discretion in drug cases. It simply has shifted some of it from the judge's bench to the prosecutor's office.

Prosecutors have devised ways to incorporate the new law into their everyday plea bargaining procedures. Defendants, facing stiff penalties if they lose at trial, appear more eager than ever to plead guilty, and their attorneys have discovered their own ploys to get them the best deals. Judges, mindful of case backlogs, have then rubber-stamped these plea bargains.

"Around here, everybody likes to see the trains run on time," defense attorney Abraham Blitzer said of the effort to move cases through the system without costly delays.

"The voters might be somewhat disillusioned. Because I don't think that it [mandatory sentencing] has had a significant impact," said defense attorney Stephen Scavuzzo. Superior Court, he said, handles cases the way it always has. One prosecutor, who insisted on anonymity, said, "A lot of times I felt like I was going behind the voters' backs." Prosecutors Defend Deals

Prosecutors and judges said the means they use to avoid mandatory sentences are necessary and note that a majority of criminal cases, nationally as well as locally, are plea-bargained.

D.C. Superior Court Judge Ronald P. Wertheim explained, "I always think of the comparison as runs on banks. If everybody wants to withdraw their money from the bank at the same time, there's no way the bank can pay everybody. And there's no way that everybody can get a jury trial, or any kind of trial within a reasonable time, if plea bargaining disappeared."

The most common arrangement allows a defendant to plead guilty to a reduced charge. In the months after the sentencing law went into effect, a 1983 Post sample showed, 14 percent of the defendants indicted on a felony drug charge pleaded guilty to a misdemeanor charge, compared with 18 percent in 1981, before mandatory sentencing.

A more recent sample shows that the practice is on a dramatic increase. Among 100 persons indicted on felony drug charges in 1985, 47 so far have pleaded guilty to misdemeanor charges, with 30 cases pending.

In fact, prosecutors say increased plea bargains are the product of a kind of shell game. In 1981, a sole drug transaction was charged as a misdemeanor crime. Now such sales are indicted as felonies, but a large percentage of cases are plea-bargained back to misdemeanors.

The net result, says U.S. Attorney Joseph E. diGenova, is that the same kind of crime is being disposed of in the same way.

Plea bargaining, said diGenova's top assistant, "is part and parcel" of the U.S. attorney's avowed goal of "a rational, aggressive prosecution" of drug offenders. Timothy J. Reardon, principal assistant U.S. attorney, said "aggressive prosecution without a thoughtful consideration of the system in which we work would be meaningless.

"It's a very delicate system and we have very limited resources," he said. "If we had the resources to prosecute all those cases as felonies, we would need five times as many prosecutors, three or four times as many judges and everybody in the community sitting on jury duty."

Besides, he said, a misdemeanor conviction is "not a slap on the wrist" since the defendant can still be sentenced to a year in jail.

Mandatory sentencing has raised new issues for plea bargaining. Take, for example, the case of Maurice Fridie, who benefited from the way prosecutors chose to read the law.

Mandatory terms can be waived for narcotic addicts who sell drugs to support a habit, but only if they have no previous drug sale convictions. Convictions routinely appear in the presentencing documents prepared for the court by probation officers.

However, the position of the U.S. attorney's office is that prosecutors control the filing of papers that alert the court to a prior conviction.

DiGenova explained that there are other instances in which D.C. law provides increased penalties for repeat offenders. In those cases, he said, judges can impose the increased prison sentences only if prosecutors notify them of a criminal's previous convictions.

Prosecutors have extended that reasoning to mandatory sentencing for drug offenders, diGenova said.

He called the practice legitimate use of prosecutorial discretion because the law did not spell out how the court would know when an addict has a previous drug sale conviction. His office asked the City Council to clarify the issue after the law was approved but the council refused, diGenova said.

"When there is inartful wording in the law, the people who have the responsibility for enforcing it have to give it meaning," said diGenova.

Plea bargaining infuriates police officers but generally is endorsed by judges.

"When I hear something like that, you figure: What are we doing out there risking our neck in a situation like that?" said Park Police Officer John Harasek, who arrested Fridie.

"It was very rare that I felt a need to question the government," said Judge Ryan. "These are the kind of deals I think that induce all these people to plead."

An increasing number of judges, however, disagree with diGenova's interpretation. One judge called it "convenient for plea bargaining, but it's illegal." Judge Nan R. Huhn said, "I don't like mandatory minimums. But I feel I have to apply the laws that I've been sworn to uphold."

The debate is the subject of an unusual case before the D.C. Court of Appeals that could have a dramatic effect on plea bargaining practices. The outcome is of such importance to prosecutors that the U.S. attorney's office is allied with a convicted drug seller in his fight against a Superior Court judge. John Mitchell, a 32-year-old heroin addict with a criminal record that included narcotics distribution, agreed to plead guilty to felony distribution. Prosecutors promised not to tell the court about his record and asked the judge to let Mitchell enroll in a drug program.

Although Mitchell's presentencing report contained no mention of his earlier drug record, Judge Stephen F. Eilperin learned about it informally and said he had no choice except to impose the mandatory term of four to 12 years. Sentence Challenged

Mitchell has asked that the sentence be struck down. And the U.S. attorney's office, arguing that it has the sole authority for notifying the court of criminals' backgrounds, has filed a brief backing Mitchell's position.

Decisions about who should be prosecuted to the law's fullest extent are made by 32 prosecutors in the U.S. attorney's office and approved by three supervisors. Their judgments on the flood of felony drug cases that pass through the office -- there were 3,000 last year -- usually have little to do with suspects' roles in drug trafficking or the amounts of drugs involved in arrrests.

Prosecutors, generally with no further discussion with police, rely on the original arrest reports and defendants' criminal records: What kind of record does he have? Was he on parole or probation? When was his last crime? How good is the evidence?

Young defendants who have clean records often can get off lightly under the so-called "one bite of the apple" practice by prosecutors -- they are allowed to plead to misdemeanor charges. In The Post's 1983 sample of 22 persons receiving mandatory sentences, for example, only two were under age 22.

Those getting hit hardest by mandatory sentencing are older, frequently petty criminals and social misfits whose biggest problem -- unlike higher-ups in organizations -- is getting arrested too often. In The Post's 1983 sample, 15 percent of those indicted were 36 or older, but 40 percent of the mandatory sentences given out fell on that group, mainly because so many had prior convictions for a variety of offenses.

"I wasn't a dealer. I was just a guy, another Joe that came along that grabs a 10-pack [a quantity of drugs] and stands on the corner. It happens every day," said Eddie Buckner, 35, an addict and former D.C. government shuttle bus driver with a long criminal record. Buckner is serving up to eight years in prison for heroin distribution.

Prosecutors wield an extraordinary amount of power in deciding who should be prosecuted on felony charges, and disparities sometimes result.

Betty Fitzgerald, a 23-year-old therapy aide for retarded city school children, and her 20-year-old sister Renee Fitzgerald had never been convicted of a crime before Sept. 15, 1983, when police crashed through the front door of a basement apartment at 1436 W St. NW. Police found six handguns, ammunition and $440 worth of heroin. They did not find who they were looking for: Derek (Chung) Johnson, Betty Fitzgerald's fiance and identified by police as the courier for a New York heroin gang.

The sisters weren't offered a bite of the apple. But prosecutors said they were willing to deal if the Fitzgeralds would cooperate with authorities in getting Johnson. They refused and the government took them to trial. Prosecutors never said the sisters were dealing drugs, only that they were shields for others who stored drugs in the apartment. Although one of the jurors later said the jury believed the sisters were caught in a web, the two were convicted and both are today serving mandatory prison terms of four to 12 years.

By contrast, Johnson is serving 18 to 54 months for heroin distribution in an unrelated case, less than half the time the sisters will have to serve before becoming eligible for parole.

One 62-year-old man, arrested twice after separate searches of his house uncovered more than $1,000 worth of heroin, was sentenced to a maximum year in jail after he was allowed to plead guilty to misdemeanor charges. A 22-year-old man convicted of selling a single $35 packet of heroin to an undercover officer got four to 12 years.

"Unlike some countries, one of the things Americans cherish most is equality. This law, as applied, produces some very disparate results," said Steve Gordon, who as director of felony trials in Superior Court for the U.S. attorney's office saw firsthand how the law worked.

"A lot of people are going to jail that a reasonable observer of the system would say, 'These people ought not to be going to jail for the sort of time they are in a truly rational scheme. And why is this system expending so much energy and so many resources on them?' " said Gordon, who is now in private practice.

The government does consider resources of the court system when deciding which cases to prosecute. Misdemeanor pleas sometimes are offered in cases that are hard to prove or time-consuming. Police in 1983 tried to close down a notorious "oil joint" -- an establishment where addicts bring in packets of drugs to get them injected -- near 14th and U streets NW. Police arrested four people on felony charges of possession with intent to distribute quantities of heroin and cocaine found during two raids.

All four were allowed to plead guilty to misdemeanor charges one year later, and the alleged leader was placed on probation without serving jail time. "You couldn't get a junkie to come in and testify," said one prosecutor.

Prosecutors have to weigh the costs of tying up court personnel over tiny amounts of drugs. Courthouse wags dubbed one such case "The One Pill Felony." Three codefendants appeared in court 13 times over a 15-month period on a charge that they sold a $15 Preludin pill to an undercover officer.

The strategy of one defense attorney was simple. "I was trying to drag it out," said attorney Daniel Harn. "Get the government tired and hope some of the codefendants would disappear, so they would say, 'Hell, there's no reason to go forward.' " All three eventually pleaded to the distribution charge, but none received a mandatory sentence -- including one who had a prior distribution conviction. Pressure to Plead

Prosecutors have several weapons to coerce guilty pleas even when the evidence is weak. There are, for example, added penalties for anyone convicted of a third felony (life in prison) or a second drug law violation (doubled penalties). Prosecutors agree not to press for added penalties in exchange for a plea.

The pressures are reflected in figures on court delays. In The Post's 1983 sample, cases took an average 11.3 months from arrest to sentencing. The average time for dispositions for previously convicted felons was 8.8 months, compared with 13.9 months for defendants with no previous convictions.

Eddie Fowler, 62, had had theft and drug convictions when he was arrested for possession with intent to distribute cocaine in the summer of 1983. He steadfastly maintained his innocence until prosecutors threatened to take him before a judge as a repeat offender.

"I was really afraid to take a chance," he said. "If the judge was really mean enough, I could have got 10 years, 15 years and the time for the repeater papers." He pleaded guilty to a misdemeanor, figuring, "I'd much rather do two years or whatever than be gambling on doing five or six years." He received one year.