The gang warned teachers and students at MC Model Girls High School in Satellite Town during the attack on Friday to "dress modestly and wear hijabs" or face the consequences, witnesses said.
The attack created panic in the area and only 25 of the school's 400 students attended classes yesterday, The Express Tribune newspaper reported. The school has 30 female teachers.
Attendance in other educational institutions in the area too remained low, the report said.
After hearing about the attack, all schools in Rawalpindi shut down, an unnamed official of the district administration told the daily.
A student of MC Model Girls High School informed the administration of a nearby boys' high school about the attack.
"The armed gang was so powerful that we could not rescue our teachers and colleagues over there," Noail Javed, a grade 10 student of the boys school said.
The official in-charge of all MC High Schools in Rawalpindi issued a notification to the heads of girls' schools to take pre-emptive measures to avert such incidents in future.
According to the notification, a gang comprising 60 to 70 men entered the school from a gate that was "strangely open."
The notification said the heads of MC High School were responsible for protecting students.
A school headmistress, who did not wanted to be named, said: "How is it possible for us to protect the students from such elements? The city administration should review its security plan."
The notification suggested that the heads of schools should not inform students about the situation so that they would not be alarmed into skipping school.
"Police is investigating the matter," the notification said.
Following the notification, the heads of schools shared the telephone numbers of police stations with teachers so that any untoward situation could be reported.
Asjad Ali, a student of class 9 at the boys' high school, said his younger brother Awais, a student of grade 5, was among those who were brutally beaten by the men with iron rods.
"The police did not come," he said.
But an unnamed official of New Town police station told the daily: "We were under strict instructions to do nothing.