The incident took place when the girl went to a shop near her house to buy chocolates in the Paramhans Vihar's Laxmi Garden Colony.
On seeing the girl alone, Sajid, who runs a dairy in the locality, took her to an abandoned house and raped her, police said.
The girl returned home crying, after which her family got to know about the incident. The family members and locals then nabbed and beat up Sajid, they said.
He was later handed over to the police. The girl has been admitted to hospital.