A Montgomery County judge strongly criticized the state's attorney's office yesterday for failing to prosecute an undercover police officer for alleged brutality. The judge suspended the guilty verdict of a Rockville man who had been convicted of pulling a gun on the officer.

Circuit Court Judge Stanley Frosh chastised prosecutors for dropping a charge of battery against Officer Stephen Filyo Jr. while pursuing the case against David W. Risik, 35, who took part in a 3 a.m. roadside confrontation with Filyo Sept. 13.

Citing court testimony from a fellow officer that Filyo had hit Risik's head repeatedly against a windowsill at a police station, Frosh lambasted the decision not to prosecute Filyo, saying it was unfair and placed Montgomery police officers "above the law."

State's Attorney Andrew L. Sonner, in an interview, harshly criticized Frosh's remarks, calling them injudicious and saying they violated ethical canons: "He had no business making that kind of remark. The issue of police brutality was never tried in a court of law, and the judge has no business discussing the facts of that case."

"Frosh is not a very good lawyer," Sonner said. "Frosh has been smarting ever since he's been on the bench because we've criticized his sentencing, and he's clearly looking for an opportunity to give us bad publicity."

Frosh denied that assertion: "I dealt with this case only and was not alluding to any previous cases."

Sonner also rejected suggestions by Frosh that his office had failed to take a strong stand against police brutality. He said his office dropped the case against Filyo because it believed that Risik had lied on the witness stand about the incident. "In my 20 years here, I don't think anyone would accuse us of being cozy with the police," Sonner said.

The case stems from a confrontation on Seven Locks Road in Rockville in which Risik, then an Internal Revenue Service employe, and Filyo, 26, a plainclothes officer dressed in blue jeans, exchanged heated words after pulling their cars side by side.

Risik, unaware that Filyo was a police officer, pulled a gun on him, according to court testimony. Filyo was later charged with beating Risik at the county police station on Seven Locks Road. Prosecutors dropped the charge against Filyo last month, saying they did not believe key portions of Risik's testimony.

From the bench, Frosh said, "Not only as a judge but as a member of the public, I am outraged, because I believe it is manifestly unfair to treat these two men differently."

He said the decision to drop the charge against the officer sent "a message to the public . . . that the police are above the law and that we in Montgomery County believe that is the way it should be."

Risik, who was convicted in March of assault and illegally transporting a handgun, will be on probation for 18 months. Frosh said that if Risik successfully completes that probation, the judge will declare Risik not guilty of the charges.

As one probation condition, Frosh ordered Risik to work for a group seeking to ban the use of handguns. Prosecutors had recommended no jail time for Risik, but, citing the seriousness of the gun incident, urged that the conviction remain on Risik's record.

Risik said he was pleased with Frosh's action, calling it "the best thing we could hope for under the circumstances." Risik, an IRS communications specialist who was in the process of being promoted to special agent when he was arrested, said he quit the agency when it became clear that he would be dismissed. He said he has just started a job selling cellular telephones for cars.

At Risik's assault trial, testimony focused heavily on Filyo's actions after Risik's arrest. Officer Raymond Simmons, under cross-examination, said he found Filyo leaning over Risik, who was handcuffed to a desk, grabbing Risik by his shirt collar and shaking him.

Simmons said he saw Risik's head bounce off a marble windowsill five or six times. Citing that testimony, Frosh told Assistant State's Attorney Marc Hall yesterday that Simmons' testimony was adequate to try Filyo for assault, even if prosecutors chose not to bring Risik as a witness.

He said Hall misled Risik's jury by telling it that a separate jury would consider the charge against Filyo. Sonner said his assistants realized only after Risik was tried that they considered him an unreliable witness.

He said that failing to call Risik as a witness against Filyo would have fatally undermined the case.

Filyo faces an internal police hearing in July on charges of using excessive force, but he has been returned to active patrol duty.