Indian lawmakers voted on Monday for a new president certain to come from the bottom of the Hindu caste system, in an election seen as strengthening prime minister Narendra Modi's grip on power.
Some 4,900 legislators nationwide voted in what Mr Modi termed a "historic" election to choose the titular head of state.
Ram Nath Kovind, the candidate of Modi's right-wing Bharatiya Janata Party (BJP) and a former lawyer and state governor from the Dalit community, is certain to win.
His main rival is Meira Kumar, the nominee of the Congress-led opposition and also a Dalit.
But the BJP, which won a landslide in a general election in 2014, has for the first time assembled enough electoral college votes across the country to push through its presidential candidate. Congress has traditionally dominated the post.
"There is no rocket science, Ram Nath Kovind will win today," Praful Patel, a leader of the small opposition Nationalist Congress Party, conceded as he cast his vote.
Mr Modi was among the first to vote, using a specially approved violet ink pen. The election commission barred the use of personal pens to ensure clean voting.
The result will be announced on Thursday.
"The presidential poll this time is historic. Probably for the first time no party has made any undignified or unwarranted comment on the rival candidate," Mr Modi tweeted on the eve of the poll. "Every political party has kept in mind the dignity of this election."
India's prime minister wields executive power, but the president can send back some parliamentary bills for reconsideration and also plays a guiding role in the process of forming governments.
Analysts said the election of Mr Kovind, 71, would help Mr Modi tighten his grip on power and accrue political capital by sending an important message to the Dalits, a long-disdained electoral group once known as "untouchables".
Dalits, who number around 200 million in the nation of 1.3 billion, are among India's poorest communities and relegated to the margins of society.
Despite legal protection, discrimination is rife and Dalits are routinely denied access to education and other advancement opportunities.
On the day of the vote, media reported the case of a Dalit labourer allegedly beaten to death by upper-caste attackers, highlighting the plight of the "untouchable" caste.
Mr Modi's rivals have protested at Mr Kovind's nomination, citing his association with the radical right-wing Rashtriya Swayamsevak Sangh, the ideological power behind the BJP.
The opposition nominee Ms Kumar, the daughter of freedom fighter Babu Jagjivan Ram, was a diplomat before entering politics in 1985 and became India's first woman speaker in 2009.
Her nomination, which followed Mr Kovind's, was seen by many as an opposition attempt to counter Mr Modi's move to woo Dalits.
Congress president Sonia Gandhi rallied opposition ranks before the vote, calling the contest a "clash of ideas and a conflict of disparate values".
"We cannot and must not let India be hostage to those who wish to impose upon it a narrow-minded, divisive and communal vision," Ms Gandhi said.
Votes from the BJP's traditional Hindu base propelled Mr Modi to his 2014 legislative victory, especially in the battleground states of Uttar Pradesh and Bihar.
Dalit support will be key for the BJP before the 2019 general election as the party has been largely shunned by Muslims, who make up about 14 per cent of the population.
"The Dalit community has bases across the country especially in all the big, electorally significant states," said Nistula Hebbar, political editor of The Hindu newspaper. "The community's vote is important for all, especially for the BJP. In a democracy, their numbers matter a lot."