Vajpayee remained a member of Parliament for 47 years -- elected 10 times to the Lok Sabha and twice to Rajya Sabha.
Former Prime Minister Atal Bihari Vajpayee, one of India's most charismatic leaders who led the nation through several crises while holding together a tenuous coalition with his inclusive politics and superlative oratory, died on Thursday in New Delhi.
He was 93.
Vajpayee, a bachelor, is survived by his adopted daughter Namita Kaul Bhattacharya.
He will be cremated on Friday in New Delhi.
Describing Atal Bihari Vajpayee as a "father figure", Prime Minister Narendra Modi said the void left by the former prime minister's death could never be filled.
In a brief televised address, Modi said through his leadership and struggles, Vajpayee had strengthened the Jan Sangh and the Bharatiya Janata Party.
"He took these parties to every part of India and spread the policies and philosophy of the BJP to the people," he added.
Modi said he had lost a "father figure" today.
"Atalji taught me valuable aspects about sangathan (organisation) and shaasan (administration)," he added.
The prime minister said whenever he met Vajpayee, the latter hugged him with affection.
"We have lost our inspiration. We have lost an 'Atal Ratna'. The personality of Atalji and the sadness due to his demise cannot be described in words. The void cannot be filled ever," he added.
Modi hailed the BJP stalwart as a wonderful orator, a prolific writer and one who dutifully served the country.
He later visited Vajpayee's 6A, Krishna Menon Marg residence to pay floral tributes to the departed leader.
The Union cabinet condoled the demise of Vajpayee, official sources said.
As per convention, the cabinet passed a resolution, condoling the demise of the BJP veteran.
A brief moment of silence was also observed, the sources said.
Vajpayee's death was announced by the All India Institute of Medical Sciences hospital where he was admitted June 11 with a variety of ailments.
"It is with profound grief that we inform about the sad demise of Former Prime Minister of India, Shri Atal Bihari Vajpayee, at 05:05 PM," the AIIMS said in a statement.
It said his condition was stable for the last nine weeks, but "unfortunately, his condition deteriorated over the last 36 hours and he was put on life support systems."
As it became clear that the end was near, a host of politicians and well-wishers began gathering at AIIMS since morning.
A pall of gloom descended at the BJP headquarters as soon the news of Vajpayee's demise broke.
Earlier, in a series of tweets, Modi said Vajpayee's demise marked the end of an era and described it as a "personal and irreplaceable" loss for him.
He said the BJP patriarch lived for the nation and served it assiduously for decades, while noting that it was Vajpayee's exemplary leadership that set the foundations for a strong, prosperous and inclusive India in the 21st century.
"Atal Ji's passing away is a personal and irreplaceable loss for me. I have countless fond memories with him. He was an inspiration to Karyakartas like me. I will particularly remember his sharp intellect and outstanding wit.
"It was Atal Ji's exemplary leadership that set the foundations for a strong, prosperous and inclusive India in the 21st century. His futuristic policies across various sectors touched the lives of each and every citizen of India," Modi tweeted.
He said it was due to Vajpayee's perseverance and struggles that the BJP was built brick by brick.
"He travelled across the length and breadth of India to spread the BJP's message, which led to the BJP becoming a strong force in our national polity and in several states," the prime minister said in another tweet.
He said India grieved the demise of Vajpayee.
"My thoughts are with his family, BJP Karyakartas and millions of admirers in this hour of sadness. Om Shanti (sic)," Modi added.
A seven-day state mourning was announced by the government as a mark of respect to Vajpayee.
Vajpayee, who joined the Rastriya Swamsevak Sangha in 1947 rose through ranks to become a stalwart of the BJP and was the first non-Congress prime minister to complete a full term in office.
In the evening, Vajpayee's body was taken to his residence at Krishna Menon marg in New Delhi where host of leaders cutting across party lines and people from different walks of life paid their last respects.
Seen as a moderate face of the Bharatiya Janata Party, Vajpayee's first became prime minister in 1996, leading a shaky coalition whose members were suspicious of the BJP's right-wing politics. It lasted for 13 days and collapsed after losing a vote of no-confidence.
His second stint as prime minister was in 1998 when the National Democratic Alliance again came to power but that lasted for just 13 months.
Finally, the National Democratic Alliance with Vajpayee as PM returned to power in 1999 and was voted out in 2004.
A lifelong bachelor, Vajpayee was first elected to Lok Sabha in 1957 from Balrampur in Uttar Pradesh in India's second general elections. His maiden speech in Parliament so impressed his peers and colleagues that the then Prime Minister Jawaharlal Nehru introduced Vajpayee to a visiting foreign dignitary thus: "This young man one day will become the country's prime minister."
He remained a member of Parliament for 47 years -- elected 10 times to the Lok Sabha and twice to Rajya Sabha.
Vajpayee's signature in politics was achieving pragmatic consensus, and in this process he earned the respect of his party, allies and opponents. Abroad, he projected a harmonious image of India and connected it to the world through his foreign policy outreach
The former prime minister was admitted to the hospital on June 11 with a kidney tract infection, urinary tract infection, low urine output and chest congestion.
Vajpayee, a diabetic, had only one functional kidney. He suffered a stroke in 2009 that weakened his cognitive abilities. Subsequently, he developed dementia.
Vajpayee was born on December 25, 1924 in Gwalior, Madhya Pradesh to a schoolteacher, Krishna Bihari Vajpayee, and Krishna Devi.
Today, his birthday is celebrated as 'Good Governance Day'.
After schooling, he graduated from Victoria College in Gwalior, now known as Laxmi Bai College. He did his M.A. in political science from DAV College in Kanpur. Following a brief flirtation with communism, he became a full-time worker of RSS in 1947.
In his tribute, BJP president Amit Shah said he was a "rare politician, brilliant speaker, poet and patriot, his demise is not just a irreparable loss for the BJP but also for the entire country."
Congress president Rahul Gandhi said on Twitter: "Today India lost a great son. Former PM, Atal Bihari Vajpayee ji, was loved and respected by millions. My condolences to his family and all his admirers. We will miss him."
Manmohan Singh, who succeeded Vajpayee as PM in 2004, hailed the BJP stalwart as a great patriot and among modern India's tallest leaders who spent his whole life serving the country.
Shah said the last rites Vajpayee will take place at 4 pm on Friday at Rashtriya Smriti Sthal in New Delhi.
The body would be taken to the BJP headquarters at Deen Dayal Upadhyay Marg at around 9 am and the funeral procession would leave the party office at 1 pm.