Four Montgomery County high school sophomores were arrested yesterday and charged with raping a 15-year-old girl in a classroom at Sherwood High School while the teacher assigned to supervise the class was out of the room.

The rape allegedly occurred between 11:45 a.m. and 12:30 p.m. last Friday in an unsupervised history class for slow learners at the high school in Sandy Spring, according to court documents filed when the four youths were arraigned.

Police, school officials and court documents gave the following account of the incident, which shocked the normally tranquil rural community in eastern Montgomery County.

The girl allegedly entered Room 205, a second-floor classroom, at about 11:30 a.m. last Friday and found seven other students there, but no teacher.

Fifteen minutes later, when the teacher had still not arrived, three of the students, two 16-year-olds and a 15-year-old, allegedly forced the girl into a corner of the room. Two boys pinned her arms against the wall while a third removed some of her clothing.

When she tried to escape, a fourth boy, also 16, allegedly joined the other youths and helped hold the girl against the wall while one of the boys raped her. Several times during the struggle, the girl screamed "Stop it! Stop it!" according to police.

The four youths, arrested at their homes yesterday, were arraigned at the Montgomery County Detention Center and released on bonds of $10,000 each. If convicted, the teen-agers -- who are charged as adults -- could receive a maximum sentence of life imprisonment.

Lynne Mainzer, the Sherwood special education teacer who was responsible for supervising the class in whch the alleged incident occurred, was placed on administrative leave with pay yesterday pending an investigation by school officials. A man who refused to identify himself answered the phone at Mainzer's Union Bridge, Md., residence and said the teacher had been advised not to comment.

School officials were not informed of the incident until Monday afternoon, when a parent of one of the students in the class met with Principal Leon Clay, according to police.

A score of students interviewed yesterday at the red brick high school, which has an enrollment of 1,500, expressed bewilderment when asked about the incident.

"A guy came out of the class and said a guy forced a girl into a corner," one student remembered.

After the father of another student in the class informed him of the incident Monday, Principal Clay interviewed the girl and the four defendants, and then called in county police. The four youths were suspended from school Tuesday.

According to school officials Mainzer, the special education teacher, was absent from the history class Friday because she had other business to take care of in school. Mainzer was in a different section of the school when the incident occurred, they said.

According to Montgomery County school policy, a teacher is required to maintain supervision of students through-out the duration of scheduled classes for which the teacher is responsible.

The man who answered Mainzer's phone yesterday said that she had retained an attorney.

The girl's grandmother brought charges against the four youths on behalf of her granddaughter after she was informed of the incident by police and school officials.

"I have nothing to say. It all speaks for itself," the girl's grandmother commented yesterday.

Meanwile, yesterday at the Montgomery County Detention Center the four defendants' parents looked on as the youths were led by handcuffs into the center.

One by one they were brought into the courtroom for arraignment and they sat glumly as District Court Judge Rosalyn B. Bell explained the charges against them.

While awaiting their sons' release yesterday afternoon, the parents expressed outrage over the arrests and confidence that the defendants would be acquitted.

One defendant's mother reacted angrily yesterday, questioning the long delay between the alleged incident and the charge. "I didn't know a thing about this until the police came to the door," she said.