A Prince George's County Circuit Court judge imposed a maximum 25-year sentence yesterday on Terrence G. Johnson, the 16-year-old youth who shot and killed two county police officers inside a police station last summer.

"You are a walking time bomb, and you exploded on June 26 and caused this senseless tragedy," Judge Jacob S. Levin told the youth. "You should be thankful . . . that I am limited by law in what I am sentencing you to today."

Johnson, who was convicted March 31 of voluntary manslaughter and illegal use of a handgun in connection with the killings, will be eligible for parole in 4 1/2 years, according to the judge.

Yesterday's 90-minute court session was punctuated by loud, angry chants from two groups of demonstrators outside the courthouse. One crowd of 125 shouted "Free Terrence Johnson," while another of 75 people stood a few feet away chanting, "We want justice, 25 years."

These final outbursts, which almost resulted in a violent confrontation between the two groups, were typical of the emotions the case has provoked in the county, which has long been troubled by tension between the largely white police force and the growing black community.

Members of the community began dividing, largely along racial lines within hours after Johnson, who is black, shot officers Albert M. Claggett IV and James Brian Swart at the Hyattsville station. Johnson and his older brother had been taken to the station as suspects in the burglary of a laundromat coin box.

Tension also was eivdent inside, the Upper Marlboro courtroom as many of those involved in the case returned to the same seats they had occupied during the two-week trial. Among the spectators in the tightly packed room was the foreman of the jury in the case.

After listening to an impassioned plea for mercy from defense attorney R. Kenneth Mundy and an equally emphatic plea for the maximum sentence from State's Attorney Arthur A. Marshall Jr., Levin handed down the sentence he had decided on before he entered the courtroom yesterday.

"This is the last act of a senseless tragedy," Levin told Johnson, who stood impassively next to his attorney. "Because you are 16 years old there will come a time when you are allowed to return to society . . .

"When you do come back, I want you to be thankful for four things. I want you to be thankful that Officer (Paul) Low (who subdued Johnson after the shootings) allowed you to live on the morning of June 26.

"Second, I want you to be thankful that 12 good citizens of this county felt compassion for you and legally absolved you of the murder of Officer Swart.

"Third, you should be thankful that someone had the foresight to hire Mr. Mundy as your attorney.

"And the last thing you should be thankful for is that I am limited by law in what I am sentencing you to today."

Recommending that the youth be sent to the Patuxent Institute for psychiatric treatment, Levin then handed down the maximum sentence.

As he did, one Johnson supporter cried out, "Oh no," and ran from the courtroom in tears.Johnson, who showed no emotion at all during Levin's speech, began trembling as sheriff's deputies surrounded him, leading Mundy to put his arm around the youth.

Second later, a loud cheer could be heard from outside as the sentence was announced to the police supporters.

They immediately picked up their chant of "We want justice, 25 years," while the Johnson supporters, standing a few feet away chanted, "We'll free him, we know it, we've got the power to show it." Then, quickly, the chants turned to epithets.

As the insults grew louder and more profane, a platoon of special operations division officers marched into the crowd, and their presence seemed to calm things.

Mundy emerged from the courthouse and said he was "sorely disappointed and hurt" by the verdict. "I think the Prince George's County Police Department was a time bomb which had already exploded before June 26," Mundy said, referring to Levin's remarks.

"I think Terrence Johnson was as much of a victim on June 26 as anyone."

Police union President Laney Hester, smiling broadly, said he was pleased not only with the sentence but with what Levin said during sentencing.

Hester led angry police officers on a one-day job action following the verdict to protest the jury's finding that Johnson was innocent of first-degree murder charges in the shootings.

"I think what the judge said is more important than the 25 years," Hester said. "I think he was saying that the jury was wrong, that he didn't go along with the verdict."

Police Chief John W. Rhoads, who came to the sentencing in spite of a painful back injury, said, "What the judge did is not for me to comment on. But nothing he did can change the fact that we lost two excellent police officers. Nothing can bring them back."

Defense attorney Mundy repeatedly stressed the same fact as he asked the judge to show his client mercy. "I know the court must agonize over this sentence," Mundy said. "But we are not going to rehabilitate Terry Johnson by maximizing the agony of his time in jail.

"Nothing we do here today can change what happened. Nothing your honor does can teach a lesson that this community has not already learned."

Prosecutor Marshall answered by repeating the accusation that Mundy was "putting the police department on trial. Terrence Johnson was examined by five (state) psychiatrists," Marshall said, "and all of them found no mental disorder.

"Personally, I think he is a danger-to the community. I think the diagnosis is that he is a punk. I have yet to see any remorse from this defendant, any feeling for anyone except himself.

"If you are going to tell the families of Officer Claggett and Officer Swart that this is a child-well, then you want to talk about with getting away with murder.

"This case cries out for the maximum sentence. I wish it could be more and I assume responsibility for the fact that it is not."

Defense attorney Mundy then concluded the appeals by saying that Marshall's request for the maximum sentence "does little to bind the wounds left by this case. To this day the state is crying to soak this boy with a maximum sentence and ignores the fact that a community has been ripped asunder by this."

Earlier, Mundy had called the Rev. Perry A. Smith as a character witness. Smith, one of the leaders of the Johnson defense coalition, testified that Johnson had "shown great remorse both for himself and the Claggett and Swart families in recent weeks."

He also said that Johnson had written him a letter saying, "I wish I had never touched the gun."

During cross-examination Marshall angrily accused Smith of being biased, quoting from a newspaper story writen before the trial in which Smith said he thought Johnson was innocent.

"Mr. Marshall, you as a lawyer must believe in the concept that one is innocent until proven guilty, don't you?" Smith replied.

Mundy said later that the sentence surprised him but his co-counsel, Joseph Gibson, who regularly practices in Maryland, said, "I told Ken it was coming. He just couldn't believe me."

Judge Levin sentenced Johnson to 10 years for the manslaughter conviction and 15 years for the handgun conviction, ordering the sentences to be served consecutively.

He also ordered that Johnson be taken to the state prison in Baltimore immediately. Normally, a convicted prisoner remains in the county detention center until a bed opens up in a state facility.

After his conviction five weeks ago, Johnson was moved to the Calvert County detention center for his own protection.

Although the parents of Officer Swart were in the courtroom, Claggett's widow, Caroline Claggett, was in North Carolina yesterday. Her mother, Betty Pleffner, said yesterday afternoon that Mrs. Claggett would be told of the sentence.

"Everybody was so darn disappointed and really surprised by the verdict," Pleffner said. "He got the maximum. The case is done, it's finished, it's time to get on." CAPTION: Picture 1, Terrence Johnson is led to patrol wagon after being sentenced in deaths of two county police officers. By Gerald Martineau-The Washington Post; Picture 2, Demonstrators outside courthouse demand maximum sentence for Johnson; Picture 3, Mother and father of convicted youth enter courthouse to hear sentence imposed. Photos by Gerald Martineau-The Washington Post