The man raped the girl when she was sleeping. (Representational)

A man allegedly raped his 8-year-old relative in a village in Uttar Pradesh's Gorakhpur, the police said today.

The accused, a resident of Sarkanda village of Mau district in Uttar Pradesh, was arrested on Tuesday evening, they said.

The incident took place on Saturday in Gorakhpur's Sikriganj area when the accused came to the girl's house for some work and allegedly raped her when she was sleeping, Superintendent of Police (south) Vipul Kumar Srivastava said.

Before raping the girl, the accused stuffed her mouth with a cloth and tied her legs and hands, he said.

On Sunday, the girl's family took her to the hospital and later filed an FIR against the accused in Sikriganj police station, the SP said.

The girl is undergoing treatment and is stated to be stable, he added.

The accused has been booked under various sections of the Indian Penal Code (IPC) and Protection of Children from Sexual Offences (POCSO) Act, the officer said.