The son, grandson and great-grandson of former prime ministers, Rahul Gandhi was seen as India's next leader in waiting when he made his foray into politics in 2004.

Two decades on, the 53-year-old opposition Congress party leader recorded his greatest success so far: a 140-odd-seat defeat at the hands of Prime Minister Narendra Modi's Hindu-nationalist Bharatiya Janata Party (BJP).

In normal political circumstances, it would rank as an electoral humiliation, but compared to the BJP landslides of 2014 and 2019, it is a stunning turnabout.

On Saturday, he was nominated to be India's official opposition in parliament.

The once-dominant Congress had withered under his stewardship, and expectations were already low even before exit polls predicted another crushing win for the BJP.

Instead, a relaxed Gandhi held up a little red book at his party headquarters on Tuesday and proclaimed that the voters "have taken the first and the biggest step to save the constitution of this country".

Congress has struggled to present a coherent alternative vision to the BJP's Hindu-first agenda, while Gandhi has been hamstrung by several criminal cases lodged against him by BJP members, including a defamation conviction that saw him briefly disqualified from parliament last year.

He has struggled to shed his image of an entitled princeling, while his often lacklustre oratory skills are overshadowed by the populist appeal of his politically battle-hardened rival Modi.

But in 2022, Gandhi sought to change his public reputation, presenting what he said was his real self by embarking on a cross-country trek to hear the concerns of ordinary voters.

A bachelor, he argued that India's media had expended time and money in portraying him in a manner "which is just untruthful and wrong" and insisting that his "truth is different".

The Congress showing at the polls was "a convincing performance", said Nistula Hebbar, political editor of The Hindu newspaper, and "definitely a big victory for Rahul Gandhi".

"He has been trolled a lot in the past and has been made a figure of ridicule," he told AFP. "This guy should get the marks just for being persistent."

- Cambridge to Delhi -

No relation to independence hero Mahatma Gandhi, Rahul was born in 1970 when his grandmother Indira Gandhi -- daughter of India's first prime minister, Jawaharlal Nehru -- was prime minister.

In 1991, when he was 20, his father Rajiv Gandhi was assassinated by a Tamil suicide bomber, seven years after Indira was shot dead by her bodyguards.

Rahul, who was then at Harvard University, dropped out. He later graduated from Rollins College in Florida, before going on to earn a master's degree from Cambridge.

After a stint as a management consultant in London, he returned to India to join the Congress party -- then helmed by his Italian-born mother Sonia -- and was subsequently elected to parliament.

Despite once comparing power to poison, Rahul formally took over the reins of the party from his mother in 2017.

Regularly fumbling while delivering speeches in Hindi, Rahul was dubbed "pappu", or witless, by Modi.

The Congress party, which dominated politics for decades after independence, was repeatedly humbled.

In the 2019 general elections, Rahul lost his formerly safe seat of Amethi in Uttar Pradesh to rising BJP star, Smriti Irani.

He is no longer officially the Congress party president, but remains by far its highest-profile leader.

- Criminal libel -

Analysts say Rahul's job is unenviable: Modi's government has been widely accused of tipping the scales in his favour.

Rahul was convicted of criminal libel last year and briefly disqualified from parliament after a complaint by a member of Modi's party.

His two-year prison sentence was suspended by a higher court but he faces several other defamation cases.

Congress's bank accounts were frozen by the tax department this year, with Rahul telling reporters the elections were "not a level playing ground" and that India was no longer a functional democracy.

Hartosh Singh Bal, political editor of The Caravan magazine in New Delhi, said this week's result "means that he will be taken with greater political seriousness".

But he cautioned, "victory is in the limited sense of the word that the BJP fell short of where it was expected to be".