A man with a knife held a 10-year-old girl in an Oakton Elementary School bathroom for several minutes Tuesday afternoon and exposed himself to her before fleeing, Fairfax County police reported yesterday.

The assailant told the fifth grader to remove her panties, and he fled after they had an exchange of words, police said.

The assault occurred shortly after 3 p.m., while classes were in session.

"She was very shaken, very afraid," said E. Wayne Harris, assistant superintendent of schools. "Fortunately, she was not physically harmed."

School officials said they would step up safety precautions. A social worker and psychologist discussed the episode with pupils and staff members.

In a letter sent home with pupils, Principal Fay Morrison said school entrances would be monitored more carefully and all visitors would be required to wear name tags, a practice the school has followed before. Children were instructed to use the bathroom only in pairs or groups, and teachers were asked to challenge any stranger not wearing a name tag.

After a morning faculty meeting, teachers gave their classes a basic account of what had happened. Harris said the school's aim was to "answer their questions, allay their fears, and put a stop to rumors."

"We just need to be a little more cautious," Harris said, but he added that the school system must walk a narrow line between heightening safety-consciousness and instilling paranoia among the more than 600 elementary pupils.