A 12-year-old Southeast Washington elementary school student was raped yesterday by an armed man in the restroom of a D.C. public school as her classmates played outside, D.C. police said.

The girl, accompanied by her mother, was taken to D.C. General Hospital where she was treated and released.

Police and a D.C. public school security spokesman said the girl had been playing on the school's playground during lunch period when she asked permission of her teacher to go to the restroom.

When the girl entered the school's basement restroom, an armed man described by the school spokesman as in his late teens or early 20s struck her in the back of the head with the gun, police said.

He gagged the girl and raped her, police said.

Shelton Lee, director of safety and security for D.C. public schools, said the girl was found crying on the restroom floor by two other students.

Authorities said one rape case was reported in a D.C. school last year.

Lee said there was little anyone could have done to prevent the man from entering the school because passes generally are not issued, and people are free to enter and leave the school -- a public building -- at will.

"This could have happened at any school," Lee said.

Lee said no major changes in security measures for the school are planned. But he urged everyone in the school to be on the alert.

"It's been an awful, awful day," said Janis Cromer, director of the school system's office of public information. "When something terrible like this happens, it raises all the questions about how can we do the most to make all our children secure."