Iman Abu Bakr Kilany, a science teacher who herself wears a niqab - a veil that also covers her face - said last month she had been removed from the school in the southern town of Luxor after complaints by relatives of the girls - the only two in her class who did not wear headscarves.
She said she was being moved to an administrative job and docked one month’s salary.
Egyptian human rights groups and women’s organizations condemned the incident as an example of hardline Muslims trying to impose their values on others since Islamists took power in Egypt.
Kilany’s lawyer said the verdict was harsh and that she would appeal, according to the state news agency MENA.
Many Egyptian women wear the headscarf, but the country’s Islamic scholars generally say it should be done out of free choice. That view is shared by the Muslim Brotherhood, the group that propelled Mohamed Mursi to the presidency in June.
The governor of Luxor province where the incident occurred called the teacher’s actions “shameful” and said she had been transferred to another school. But rights groups say that some Islamic conservatives have been emboldened by the success of groups like Muslim Brotherhood and the ultraconservative Salafi trend in parliamentary and presidential elections and have been increasingly brazen about forcing their standards on other Egyptians.
Kilany told the Egyptian al-Ahram newspaper earlier that the amount of hair she cut off of the girls’ heads “did not exceed two centimeters” (one inch).
Kilany added that she had asked all her girl students to put on the headscarf because it was required for girls older than 10 - a view disputed by many Muslims.
While Mursi and his administration have repeatedly said they will not seek to impose strict Islamic codes of behavior, the rise to prominence of an array of Islamist groups has alarmed more secular-minded Egyptians and the sizeable Christian minority.