Both have been booked under the POCSO Act, apart from other relevant provisions of the law.
The crime was allegedly committed a year ago but came to light after another teacher came across a WhatsApp audio message in which two men, reportedly the accused Principal and teacher were heard discussing the class 11 student's abortion.
After the matter was brought to the notice of police and other authorities, the girl's statement was recorded before a Duty Magistrate.
Accused teacher Harjit Singh and school head Bharat Bhushan have been booked for rape and criminal conspiracy under the Indian Penal Code, Protection of Children from Sexual Offences (POCSO) Act, Information Technology Act, and Scheduled Castes and Scheduled Tribes (Prevention of Atrocities) Act.
Ludhiana (Rural) Senior Superintendent of Police Surjit Singh told the media that the teenager alleged that she was raped by the teacher in the school library.
The teacher is no longer posted in the school where the girl was studying.
The Punjab State Commission for Protection of Child Rights has sought a report from the District Education Officer in this matter.