The result was a thundering victory for Mr. Modi and his party, who promised to give India a greater role worldwide by staying tough on Pakistan and encouraging investment and development in one of the world's fastest growing economies.
Mr. Modi's party won 303 seats in Lok Sabha, the lower house of the Indian Parliament, compared to 52 for Congress, which did not even reach at least 10 percent of the seats required to lead the opposition. The defeat was so shattered that Mr. Gandhi lost his seat in the Amethi district, which his family had been holding for decades. (However, he won in another seat in the southern state of Kerala.)
In his letter of resignation, Mr Gandhi said that he had ultimately gone down because he felt responsible for the election, even though he did make it clear that he would still play a role in the party. He called for the restoration of India's "once loved institutional neutrality" and warned of "unthinkable levels of violence and pain" against minorities if the country's democracy were not protected.
"My struggle has never been a simple blow to political power" wrote. "I have no hatred or anger at BJP but every living cell in my body instinctively resists their idea of India."
Currently, analysts say the future looks challenging next to Congress, the party that played a leading role in India's struggle to break away from Britain and then rule the country for most of its post-independence history.
It has been led by four generations of the Nehru-Gandhi dynasty, which does not take the Gandhi name from the leader of independence, but from the marriage of Nehrus's daughter Indira to another congressional activist with that surname.