A member of the Dalit community has been chosen India's new president, a largely ceremonial position.

Ram Nath Kovind was elected by the Indian Parliament and state legislatures in voting held on Monday, with the results announced on Thursday.

Mr Kovind is a former governor of the eastern state of Bihar and a long-time associate of the Rashtriya Swayamsevak Sangh, or National Volunteer Corps - a Hindu group that has been accused of stoking religious hatred against Muslims.

The group is the ideological parent of Prime Minister Narendra Modi's Hindu nationalist Bharatiya Janata Party, which controls enough seats in federal and state legislatures to push its favoured candidate.

The president's role is mainly ceremonial. He is bound by the advice of the Cabinet led by the prime minister, who is the chief executive.

Mr Kovind pledged to help poor farmers and workers as he recalled his childhood living in a mud hut in a northern Indian village.

"I never dreamed of this position. This was not the ambition of my life," Mr Kovind said, thanking those who voted for him.

He will replace Pranab Mukherjee, a former senior member of the Congress party, on July 25.

He received 65.5% of votes against his opponent, Meira Kumar of the Congress party, a former speaker of the lower house of India's Parliament.

Both Mr Kovind and Ms Kumar belong to the Dalit community, which is at the lowest end of the complex caste hierarchy in Hinduism.