Indians will finally find out on Thursday who won the general election after a long and bitter campaign.
Counting of ballots began at 08:00 local time (02:30GMT) after six weeks of voting ended on Sunday.
Prime Minister Narendra Modi, whose Bharatiya Janata Party (BJP) stormed to power in 2014, campaigned hard to retain his commanding majority.
He was up against the resurgent main opposition Congress party and powerful regional rivals across the country.
Exit polls have predicted a win for Mr Modi, but analysts warn they have often been wrong in the past.
This election is seen as a referendum on Mr Modi, a polarising figure adored by many but also blamed for increasing divisions in India.
A party or coalition needs at least 272 seats to secure a majority in the 543-member lower house of parliament, or Lok Sabha.
In 2014, the BJP captured 282 seats – the biggest victory by any party in 30 years. The Congress, which won just 44, suffered its worst defeat.
This year, there were 900 million voters eligible to take part in seven rounds of voting, making it the largest election the world had ever seen.
The fate of more than 8,000 candidates and some 670 political parties hangs on the ballot.
Results will be released in phases by the Election Commission – a picture of who is winning could emerge within hours, or it could take longer depending on how close the race is.
Final results are not expected until late on Thursday local time, or early Friday. Extra checks matching printed ballots against electronic voting machine results could delay the process.
Mr Modi, with his tough image, remains the BJP’s main vote-getter. The party and its allies could retain their majority, even if they lose some seats. Critics say promises of stellar economic growth and jobs have not been met, and India has become more polarised along religious lines under his leadership.
His main rival is Congress leader Rahul Gandhi, who is trying to win over an India weary of his family’s dynastic grip on politics. The party’s chances of winning a majority appear slim. It also failed to stitch up a pre-vote alliance in crucial states in the east and the south – a sign of its waning influence, analysts say.
If neither of the two main parties can win an outright majority, powerful regional parties could play the role of kingmakers in a hung parliament.
A string of exit polls all suggested this outcome was unlikely and predicted a BJP win, but the forecasts were rejected by the opposition.
It’s often said that whoever wins Uttar Pradesh, wins the Indian election. The huge northern state sends 80 MPs – more than any other – to parliament. In 2014 the BJP won 71 seats there. This time, a repeat performance seems far from certain.
In a surprising move, the Bahujan Samaj Party (BSP) and Samajwadi Party (SP) – bitter rivals – banded together to form a so-called “grand alliance” against Mr Modi. Together, they could chip away at the BJP’s impressive 2014 seat tally.
So the ruling party is hoping to make up for any losses with gains in states such as West Bengal, where it holds just two of the 42 parliamentary seats. Here, the BJP is up against Chief Minister Mamata Banerjee – a contest that produced some of the election’s fiercest exchanges.
Four of India’s five southern states – Andhra Pradesh, Telangana, Tamil Nadu and Kerala – have long eluded the BJP. Of the 91 seats in these states, the BJP holds just four. In this part of the country, the party contests few seats, relying instead on alliances with regional heavyweights.
Electronic voting machines or EVMs have been used in three Indian general elections before this one. They save money and time and results come within hours, rather than the nearly two full days it took when ballots were tallied manually.
Each of India’s 1.7m EVMs record up to 2,000 votes (the number of registered voters at any given polling booth does not exceed 1,500) and 64 candidates. After being unsealed they are individually inspected by counting staff and agents, overseen by a returning officer.
When he or she is satisfied that a voting machine has not been tampered with they press a button marked “result”. The officer assesses the total number of votes given to each candidate before signing the results sheet and sharing it with the Election Commission.
The EVMs are counted in batches, and results released in phases. The media report the results in real time as they emerge. Final results on the Election Commission website come later.
All the machines now have printers producing voter-verifiable paper audit trails to ensure transparency.
Authorities will tally the paper trail slips – which are kept in separate sealed boxes – and compare them with the electronic result provided by the machine in at least 5% of polling booths. Election officials say this process could delay final results by a couple of hours.
The economy is perhaps the biggest issue, with farming in crisis, unemployment on the rise and fears growing that India is heading for a recession.
A crop glut and declining commodity prices have led to stagnant farm incomes, leaving many farmers saddled with debt.
Under Mr Modi, the world’s sixth-largest economy has lost some of its momentum. Growth hovers around 7% and a leaked government report this year said the unemployment rate is the highest it has been since the 1970s .
Many also see this election as a battle for India’s identity and the protection of minorities. A strident – and at times violent – Hindu nationalism has become mainstream in the past five years, with increased attacks against minorities, including the lynchings of dozens of Muslims accused of smuggling cows.
And national security is in the spotlight after a suicide attack by a Pakistan-based militant group killed at least 40 paramilitary police in Indian-administered Kashmir in February. India then launched unprecedented air strikes in Pakistan, prompting it to respond in kind and bringing the two countries to the brink of war.