Indira Gandhi holds the distinction of being the first Indian Prime Minister to lose a general election. In the 1977 Lok Sabha elections, she faced a major political setback when she was defeated in the Rae Bareli constituency by Raj Narain, a candidate from the Janata Party. This defeat came in the wake of the nationwide Emergency (1975–1977), which had generated widespread criticism and political unrest. The 1977 elections marked the end of her uninterrupted tenure as Prime Minister since 1966 and ushered in the first non-Congress government at the Centre.
Interestingly, Raj Narain had earlier contested against Indira Gandhi in the 1971 elections from the same Rae Bareli seat but had lost. Following his defeat, he famously challenged the validity of her victory in court, leading to a landmark judgment by the Allahabad High Court in 1975, which found Indira Gandhi guilty of electoral malpractices. This ruling was one of the catalysts for the imposition of the Emergency. His eventual victory over her in 1977 symbolized a dramatic reversal in Indian politics and reflected the democratic resilience of the nation.