Mr Vajpayee, an enduring paradox of Indian politics, ruled the country for 13 days in 1996, 13 months in 1998 and for almost six years from 1999. He was India's only non-Congress prime minister to last a full five years in office.
The son of a schoolmaster from Gwalior, Mr Vajpayee joined the Rashtriya Swayamsevak Sangh or RSS in 1939 and became a full member in 1947. In 1951, he was drafted, along with Deen Dayal Upadhyaya, to work with the Bharatiya Jana Sangh, the predecessor of his BJP.
Mr Vajpayee rose swiftly up the ranks but Jawaharlal Nehru, India's first prime minister, remained his idol. Mr Nehru described the young Vajpayee as a 'bright prospect'.
Mr Vajpayee spent months in prison when Indira Gandhi imposed Emergency Rule in June 1975. In the Janata government that came to power in 1977, Mr Vajpayee became foreign minister.
Noticed for his charisma, wit and oratorical skills, Mr Vajpayee won popularity and respect from across the spectrum.
His first entry into parliament was in 1962 through the Rajya Sabha. It was only nine years later that he won an election. He was elected to the Lok Sabha seven times.
The lowest point in his career came when in 1984, after Indira Gandhi's assassination, the BJP that he set up with his long-time friend and colleague LK Advani managed to win just two seats in the 545-member Parliament. Mr Vajpayee also lost in Gwalior, his birthplace.
Mr Vajpayee, however, was the only voice in his party who called it the "worst miscalculation" when karsewaks razed the mosque in 1992.
An astute politician, Mr Vajpayee mentored the 1998 nuclear tests in Rajasthan's Pokhran, which led to sanctions against India by countries including the US and Japan.
Among his boldest initiatives was his historic bus journey to Lahore in 1999 when he signed the landmark Lahore Declaration with Pakistan's Prime Minister Nawaz Sharif with both sides pledging to push for peace and security.
For the two-time enigmatic PM, his health, however, also became a matter of concern. In 2009 he had to be admitted to the hospital barely 48 hours before his party's National Executive in Nagpur. Since then, he has been largely confined to his home in the capital, away from public life.
In 2015, Mr Vajpayee was conferred the Bharat Ratna, India's highest civilian award.
Follow NDTV for latest election news and live coverage of assembly elections 2019 in Maharashtra and Haryana.
Subscribe to our YouTube channel, like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.