Maryland's second highest court today upheld the conviction and 25-year sentence of 16-year-old Terrence G. Johnson, who was found guilty of slaying one Prince George's County police officer and acquitted by reason of insanity in the death of the second.

Johnson's attorneys immediately pledged to continue their appeals.

Johnson's trial last March in Upper Marlboro exacerbated racial tensions in the county. He is black and the two dead officers were white.

In a 28-page opinion, a three-judge panel of the Court of Special Appeals here today discounted 10 separate objections that Johnson had raised about his trial, which resulted in convictions on charges of manslaughter and a handgun violation.

In particular, the court said that Johnson's principal argument -- that he should have been tried as a juvenile, rather than as an adult -- was "wholly devoid of merit." The court said the Circuit Court judge who ruled on Johnson's waiver to adult court, Vincent J. Femia, had not "abused his sound discretion."

The court also upheld the sentence of Circuit Court Judge Jacob S. Levin, who presided at the trial, as "carefully considered and weighed," and affirmed Levin's decision against allowiwng Johnson's attorneys to introduce evidence on the reputation of the county policy for brutality.

The opinion said a public opinion survey on the reputation of county police that was ruled out by Levin was "so fraught with the potentiality to inflame the jury that its use would have denied the State a right to a fair trial."

In all, the opinion rejects all but two of Johnson's procedural and constitutional objections on their merits. The two remaining issues are eliminated on the grounds that Johnson's attorneys had no right to argue them before the appeals court.

One of Johnson's attorneys, Allen M. Lenchek, said today he was disappointed by the court's ruling, but that he was sure Johnson's family would want to carry the case to the state's highest court, the Court of Appeals.

"I don't know what grounds we will appeal it on," Lenchek said, "I haven't read the opinion yet."

"But we will look at the opinion, study it, talk it over with the family, and take it from there. The family has been determined to see this thing through to the end and make the last appeal, and I don't think this decision will change that."

Asked if the Johnsons, who have been the beneficiaries of several highly publicized fund-raising drives for their son's defense, would have the funds necessary for another appeal, Lenchek replied, "Where there's a will there's a way."

Johnson originally was charged with two counts of murder after he allegedly shot Officers James Brian Swart and Albert M. Claggett IV on June 26, 1978, in the Hyattsville police station.

Johnson's attorneys argued at his trial that he was innocent by reason of insanity in the death of Swart and innocent by reason of self-defense in the slaying of Claggett.

A jury eventually found Johnson guilty of manslaughter and illegal use of a handgun in the death of Claggettt, and innocent in the death of Swart.

The appeals court opinion said that "it is safe to say that when the state was trying Johnson for the alleged offenses, the defense simultaneously was seeking to try the Prince George's County police department for brutality and racial discrimination.

"The verdicts," said the opinion, "would seem to indicate that neither the state nor Johnson was totally successful, but that each apparently satisfied the jury to some degree."