Jason W. Knight, one of two teenagers charged in the February ransacking of a Rockville high school, pleaded guilty yesterday to participating in what authorities said was the costliest and most devastating act of vandalism at a school in Montgomery County.

Circuit Court Judge DeLawrence Beard declared Knight guilty yesterday of two counts of malicious destruction of property and one count each of attempted arson and breaking and entering with the intent to commit a felony.

Knight, 19, faces a maximum of 26 years in prison. He will remain free on $20,000 bond until his scheduled sentencing Dec. 3. Six other charges against Knight are expected to be dropped, attorneys said.

As Knight sat expressionless at the defense table, prosecutor Constance A. Junghans described in extensive detail the rampage and destruction that Knight engaged in at Richard Montgomery High School during the weekend of Feb. 23 to 25. Another youth, Stephen L. Bonner, is awaiting trial for his alleged role in the crime.

Junghans said the vandalism caused $650,000 in damage to the high school, which is at Rockville Pike and Richard Montgomery Drive. Principal Thomas Quelet and about 20 students attended yesterday's hearing.

Bonner, 17, a senior at the school when the vandalism occurred, is scheduled to go to trial Oct. 16. Bonner, who has cooperated with authorities, first was charged as a juvenile, but later was waived to adult status and indicted in June on four felony charges.

Bonner was released to his parents and remains free on his own recognizance.

If a jury trial had been held in Knight's case, Junghans said witnesses and physical evidence would show that Knight and Bonner deliberately set 10 fires in the school during the early hours of Feb. 24, smashed windows, ransacked offices and opened gas jets in the school's science labs that could have set off deadly explosions with the flip of a light switch.

Displeased with the extent of damage on the first attempt, Junghans said the youths returned to the school the next evening with five cans of charcoal lighter, boxes of matches and a hatchet. After prying open a rear door, the pair allegedly demolished computers and other electronic equipment and burned library books and card catalogues.

Junghans said the suspects scrawled antisemitic messages and bomb threats in purple ink on walls and notebooks. One note said, "If you can find our bomb before 1 p.m., you live," the prosecutor said.

The antisemitic graffiti, Junghans said, was done to confuse police and try to link the incidents to a "skinhead" group, she said.

Three days after the vandalism, two students told police Bonner had implicated himself in the break-ins and rampage, according to Junghans. Junghans said Knight first gave conflicting statements to police about the incidents. Police later seized blood-stained clothing and gloves worn by Knight from his house, Junghans said.

Junghans said the destruction was aimed at no one in particular. The library, which suffered the brunt of the damage, was chosen because of its size and the abundance of paper products, she said.

Quelet said yesterday the school's 1,400 students have been distressed by the vandalism. "You don't smell smoke or feel the pain, but it has had an impact on the students," he said.