Police in northern India arrested a man who allegedly threw a girl into a pile of glowing embers after he caught her trespassing, an attack authorities said Wednesday may have been motivated by caste.

The 6-year-old girl is recuperating at a state-run hospital in Mathura, the north Indian city where the alleged attack occurred, said Dr. Ramesh Kumar.

She is considered a dalit _ a member of the lowest caste in India, where a system of rigid social hierarchy still lingers. The alleged attacker, Madan Singh, 22, comes from a higher caste.

Singh discovered the girl relieving herself Tuesday in a field he owned and demanded she immediately stop what she was doing and leave his property.

"When she did not respond, he simply lifted her and threw her in a heap of embers," local police official Govind Agarwal told The Associated Press. "The cry of the girl drew the attention of the villagers. They came rushing and pulled the girl out of fire."

Singh was arrested Wednesday and charged with attempted murder, said police official R.K. Chaturvedi. Police are investigating whether Singh attacked her because of her caste, he said.

A complex hereditary system divides Hindus into castes, and those on the lower rungs of the social ladder still face intense discrimination _ even though the system was made illegal nearly six decades ago.

In much of rural India, people of lower castes are kept from upper-caste drinking wells, barred from temples and kept out of village schools. Violations are often met with violence.

The attack took place in the northern state of Uttar Pradesh, which is governed by India's most powerful low-caste politician, Mayawati, a dalit woman who uses only one name.

Mayawati is the leader of a movement to empower dalits — the lowest class in India who were once known as "untouchables" — but crimes against them remain common across her state.

Hindus make up about 84 percent of India's 1.1 billion people. There are also caste-like divisions among Muslims, who account for 13 percent of India's people, and Christians, who make up 2.4 percent.