The Frederick County school system has demoted a high school principal whose suspension last month of 16 algebra students for allegedly cheating on an exam prompted heated protests from the students' parents.

Middletown High School Principal Charles G. Clark, 37, said last week that Superintendent Stuart D. Berger told him on July 7 that he was being relieved of his post at the 900-student school because his part-time job as a photographer was a "conflict of interest."

He became principal two years ago after rising through the school system ranks. He started 16 years ago as a social studies teacher and became an administrator in 1978.

Clark said Berger wrote him later saying that he would be reinstated as a social studies teacher beginning in August.

Clark said that while he was "shocked" at the superintendent's action, he had had "no indication" that the suspensions led to his dismissal as principal. But he said he intends to appeal the school board decision to demote him.

County school personnel director Dan Gadra said he could not comment because "the case may lead to some form of litigation."

School officials said Berger was on vacation and unavailable for comment.

Two weeks ago, about 40 Middletown parents presented a petition with 150 signatures to the school board asking that Clark be reinstated as principal.

Several parents who described Clark as an effective principal said they would join him in his fight before the board.

Despite the support for Clark, the superintendent carried out the board decision and sent Clark a letter on July 19 informing him of his demotion.

Clark first came under fire last month after punishing 10th and 11th graders when it was discovered that a question sheet for the high school's final algebra exam had been stolen.

According to school officials, the answers had been calculated, plugged into a home computer and distributed on printouts to several students. As a result, 16 students were suspended for two to five days.

At that time, parents of five of the students protested the suspensions and called for an emergency school board meeting to discuss what some parents called "Gestapo-like" interrogations that had resulted in those suspensions.

In a letter to the county school board, those parents charged that two assistant principals "indiscriminately accused, interrogated, brow-beat and pitted student against student . . . to obtain confessions."

County school officials, however, defended the punishment and said an internal investigation had found the school's procedures proper.

Hal Aaslestad, whose 17-year-old daughter attends the high school, said, "When a superintendent dismisses a principal that is highly regarded by the community, it gives the entire county academic staff a shiver, upsetting the quality education we enjoy in the county."

Another Middletown parent, Chris Johnson, said Clark is well-liked and known as a disciplinarian who has "a genuinely good-natured rapport with his students."

"He is just a wonderful . . . man, and we will do all we can to support him and restore harmony to this school," Middletown resident Barbara McHugh said.

Clark said this is the first time he had been reprimanded by the board.