Additional District and Sessions Judge Narender Sharma also imposed a fine of Rs 10,000 on 25-year-old Azad Ali.
The judge pronounced that in case of default in payment of the fine, Ali would have to undergo a further imprisonment of six months.
Ali was a neighbour of the victim and had lured the school-going girl to his house on the pretext of helping her complete her homework on January 9, 2014.
He took the girl to his house in Mill Gate area here and raped her.
The parents of the victim were not at home when the incident took place. The girl narrated the incident to her mother next morning, following which they approached the police.
After the victim's medical examination in Civil Hospital in Hisar, the city police had registered a case under Section 376 (rape), 506 (criminal intimidation) of the IPC and under Protection of Children from Sexual Offences (POCSO) Act against Ali.