BALTIMORE, JUNE 12 -- James M. Herl, who gave up his seat on the Prince George's County Council after pleading guilty to cocaine possession, was placed on probation and fined $5,000 today by a federal magistrate who chided Herl for "continuing to use drugs" privately "while championing the fight against drugs" in public.

Herl, 37, a two-term Democrat who has spent most of his adult life in county politics, apologized in U.S. District Court for his cocaine use, which a federal prosecutor said began in 1979.

"I've taken a big fall, one I'll never forget," Herl told Magistrate Paul M. Rosenberg in a brief statement. "Cocaine brought me down."

U.S. Attorney Breckinridge L. Willcox said he was satisfied with the sentence, which includes three years' probation. Under federal guidelines, Herl could have received up to six months in prison.

Herl resigned his council seat effective May 31. Yesterday, the Prince George's County Council, ignoring a charge that it was rubber-stamping a backroom deal, chose state Del. Anne T. MacKinnon (D-Riverdale) to fill Herl's vacant council seat.

After an acrimonious debate, the council voted 7 to 1 to seat MacKinnon, 33, a delegate from the county's 22nd District, until the Nov 6 election. MacKinnon said she will run for the council seat.

The sole vote against her came from council member Floyd E. Wilson Jr., a candidate for county executive, who charged that the public had no voice in MacKinnon's selection.

Wilson, a Democrat, said the choice had been dictated by the Democratic Party "machine." "The perception is that we've been told what to do by the machine, and you do what they tell you," he said.

County Executive Parris Glendening, along with state Senate President Thomas V. Mike Miller Jr. and Sens. Thomas O'Reilly and Arthur Dorman, chose MacKinnon as their top candidate after weeks of private negotiations and interviews with candidates.

O'Reilly yesterday rejected the notion that MacKinnon's selection was a backroom deal.

"This was anything but machine politics. If anything, it is elective and representative politics at its best," he said. "Anyone who was interested in this job had months and months to come forward. We did our best to select a person of high quality."

Herl took over the council's rotating chairmanship in December but his career came to an abrupt halt in January when he gave a half-gram of cocaine to an undercover county police officer. He pleaded guilty Feb. 14 to one misdemeanor count of cocaine possession.

"Today, he stands before you publicly humiliated," Herl's attorney William C. Brennan, told Rosenberg. "The 15 years of public service he has put in have gone down the drain."

Herl admitted guilt as part of a plea bargain with the U.S. Attorney's Office in which prosecutors agreed not to recommend jail time and Herl agreed to pay a fine of up to $5,000. Besides instructing Herl to pay the fine within 30 days, Rosenberg placed him on three years' probation and ordered him to perform 240 hours of community service.

Herl, who underwent three weeks of drug treatment at a Virginia rehabilitation center in January, must continue to receive counseling while on probation if federal probation officials see fit, Rosenberg ordered.

Brennan asked the magistrate to sentence Herl to probation before judgment, under which Herl's criminal record would have been expunged if he had successfully completed his probation.

But Rosenberg declined to do so. He noted that Herl had been granted probation before judgment after a drunken driving arrest in Montgomery County in 1987, and had "abused the trust of the court" by continuing to use cocaine during his probation in that case.

Brennan told Rosenberg that he reserved the right to declare within 10 days whether he will appeal the sentence.

Herl forfeited a $45,000 salary when he resigned from the County Council, but has had "a number of very significant discussions with a number of people" about a private-sector job that would pay about $60,000 a year, Brennan said.

Assistant U.S. Attorney E. Thomas Roberts told Rosenberg that Herl displayed a "hypocritical attitude" by condemning drug use publicly while using the drug in private.

However, Brennan noted that his client has "fully accepted his responsibility" in the matter. "He has not blamed this on anyone else," the defense attorney said. "He has never said he was tricked by the police department . . . . He was tricked by one person, and that's himself."

Herl declined to comment after the sentencing, and Brennan declined to say whether his client hoped eventually to reenter politics.

Willcox, a Republican appointee, called Herl's resignation "an important ingredient" of the plea bargain.