Results will be out on Thursday (May 23) for the world's biggest election, spanning seven phases over six weeks. Thousands of candidates vied for 543 seats in the lower house of Parliament.
With around 900 million Indians eligible to vote, turnout was 67.34 per cent, compared with 66.13 per cent in the 2014 general election.
Elections were held in 29 states and seven union territories, from the most populated state of Uttar Pradesh, sending 80 seats to parliament, to northeastern states like Nagaland, which has one.
This has been one of the most acrimonious elections with the ruling Bharatiya Janata Party (BJP) led by Prime Minister Narendra Modi seeking to come back for a second term against rival Congress and a host of regional parties.
The election is seen as a referendum on Prime Minister Narendra Modi's performance over the last five years.
Some 1,866 political parties are registered with the Election Commission of India, though not all parties are understood to have participated in the election
Following are some key details:
Prime Minister Narendra Modi
The 68-year-old former chief minister of the state of Gujarat and leader of the BJP dominated the election campaign. He remains popular after his five-year term and even when weighed down by problems like growing unemployment and a crisis with farmers unable to sell their produce at good prices.
His image of a strong and decisive leader, backed by his rise from humble roots, including serving tea in trains, continues to appeal to an aspirational India seeking to rise above caste and class. In the 2014 elections, voters, fatigued by years of fractious coalition governments voted overwhelmingly for Mr Modi, who had been credited for converting the western state of Gujarat into an economic powerhouse. His decision to launch an air strike in February against Pakistan contributed to his image as a strong leader. Critics accuse him of being always in campaign mode and failing to reign in Hindu nationalist groups.
Congress president Rahul Gandhi
Mr Modi is pitted against the 48-year-old leader of the Congress party, who belongs to the illustrious Nehru Gandhi clan.
His great grandfather, Jawaharlal Nehru, was India's first Prime Minister, and his grandmother, Indira, and father, Rajiv, were both also prime ministers.
Yet Mr Gandhi has failed to capture the public imagination and his dynastic inheritance has often left him open to criticism. Rivals have accused him of not having the political calibre to lead the Congress party and cruising on the back of his distinguished family.
Nonetheless, Mr Gandhi, after years of being seen as a reluctant prince of Indian politics, emerged in these elections as a more consummate politician. He has been at ease in front of cameras, has not shied away from taking uncomfortable questions and has often used humour to take on his rival.
Amid a particularly acrimonious campaign, Mr Gandhi struck a different note, telling voters Mr Modi campaigned on hatred in the election but he and the Congress party were about love.
In India regional leaders have always been important in federal politics. Among those who stood out in these elections was Ms Mamata Banerjee, the firebrand leader of the Trinamool Congress, who campaigned vigorously to defend West Bengal from the onslaught of the Bharatiya Janata Party and its message of Hindu nationalism.
The 64-year-old, known for her simple living, which includes wearing plain cotton saris and sandals, also helmed efforts to forge opposition unity, which, however, remained elusive in these elections.
Regional rivals Mayawati of the Bahujan Samaj Party, and Akhilesh Yadav of the Samajwadi Party, entered an alliance to take on the BJP in Uttar Pradesh, the most politically important state with 80 seats.
Other regional leaders who tried to dominate the federal space included Andhra Pradesh chief minister Chandrababi Naidu, a one-time Modi ally, who apart from trying to come back to state power also crisscrossed the country trying to cobble together an opposition alliance. He remains active in trying to get opposition forces together.
These elections could also see the rise of M K Stalin, leader of the Dravida Munnetra Kazhagam (DMK), in Tamil Nadu. Elections in the southern state took place in the absence of political heavyweights, Ms J Jayalalithaa of the All India Anna Dravida Munnetra Kazhagam, who died in 2016 and Mr M Karunanidhi, the leader of the DMK, who died last year (2018).
What are the issues ?
Some have called these the issue-less elections, with those receding to the background and the personalities of Mr Modi and Mr Gandhi rising to the fore.
But the Congress and other opposition parties did campaign on issues such as unemployment, the farm crisis and allegations of impropriety by the BJP in a defence deal. Unemployment remains a serious problem, as job creation has not kept pace with the millions entering the labour market each year. There has also been discontent in rural parts with farmers struggling with debt, exacerbated by lower prices for their produce.
The BJP tried to keep the focus away from jobs and the farm crisis and managed to successfully run its political campaign on the popularity of Mr Modi and the issue of national security, following the outbreak of hostilities with Pakistan over the killing of 40 Indian soldiers in Kashmir in April.
India launched air strikes on what it said were terror training camps in Pakistan, leading to an upsurge of nationalist sentiment in the country. The BJP pitched this as an example of the strong governance by Mr Modi.
Hindu nationalism also played an important part of the elections for the BJP, which nominated Pragya Singh Thakur, who is awaiting trial on terrorism charges, as the candidate for Bhopal constituency. BJP leaders have maintained there is no such thing as Hindu terror. Another candidate,Ms Maneka Gandhi, was given a time out from campaigning by the Election Commission for telling Muslim voters that they would be deprived of development if they did not vote for the BJP.
What is different in the election process this time?
Opposition parties have accused the ruling party of trying to misuse or tamper with the Electronic Voting Machines, though the Election Commission maintained there was little chance of tinkering with them.
With this backdrop, the Election Commission announced that a Voter Verifiable Paper Audit Trail (VVPAT) would be used in all polling stations. This is the first time VVPATs have been used in all the constituencies in a general election.
The VVPAT is a paper record of the voter's selection and can be seen by the voter for seven seconds before it goes to a sealed ballot compartment.
The VVPAT slips will also be counted, according to a Supreme Court direction, at five random polling booths and tallied with the EVM count.
How has the campaigning shaped up?
In an often toxic election environment, political leaders took personal potshots at each other as they engaged in widespread negative campaigning.
Congress president Rahul Gandhi accused Mr Modi of being a "chor", or thief, for a defence deal the opposition has said was improper. Mr Modi called Mr Gandhi's father Rajiv, a former Prime Minister who was assassinated on the campaign trail, India's most corrupt man, who used a warship during a family holiday two decades ago.
Ms Mayawati accused Mr Modi of "abandoning" his wife and said that he could not respect women.
Mr Modi had an arranged marriage at a very young age but he is estranged from his wife.