AB Vajpayee: The PM who consolidated India as a nuclear power
Atal Behari Vajpayee's tenure as Indian prime minister brought his country's emergence as a nuclear power, triggering fears of conflict with Pakistan.
These worries were heightened by increasing tension over the disputed region of Kashmir and a long confrontation between Indian and Pakistani troops.
Throughout his time in office, Vajpayee struggled to hold a diverse coalition of parties together.
But he gained a reputation as a man who fiercely defended India's interests.
Shri Atal Behari Vajpayee was born in Gwalior, Madhya Pradesh state, on 25 December 1924.
He studied politics and became a journalist and social worker while, at the same time, becoming active in the Quit India Movement, which campaigned to end British rule in the subcontinent.
After independence Vajpayee became a close aide of Syama Prasad Mookerjee, the leader of the Hindu nationalist Bharatiya Jana Sangh (BJS) party.
He was elected to parliament in 1957 and, despite his relative youth, was seen as a rising star.
Like many BJS activists, Vajpayee was detained by the Congress party government of Indira Gandhi during the so-called "emergency" of 1975-77.
The BJS joined a number of political groups to form the Janata party, which swept to power in the ensuing elections.
As external affairs minister in the government of Morarji Desai, he made a historic visit to China in 1979 as well as making attempts to improve relationships with Pakistan.
Vajpayee resigned in 1979 and, when the Janata coalition lost power in 1980, he joined others in founding the Bharatiya Janata Party (BJP), becoming its first president.
The BJP, an avowedly Hindu organisation, supported Indira Gandhi's crackdown on Sikh militants who had occupied the Golden Temple at Amritsar.
However, Vajpayee strongly condemned the outbreak of violence against Sikhs that followed the assassination of Gandhi by her own Sikh bodyguards.
Throughout the 1980s the BJP attracted a new wave of hardline Hindu activists, many of whom took part in clashes against Muslims in December 1992 that resulted in more than 1,000 deaths.
In 1996 a demoralised Congress party lost the elections and the BJP became the largest political party in the new parliament.
Vajpayee was asked to form a government but, unable to pull together the various warring factions in parliament, resigned after only 13 days.
Two years later the BJP finally managed to form a coalition, known as the National Democratic Alliance, and Vajpayee was sworn in as prime minister.
It was an uneasy and creaking coalition but the failure of any coherent opposition kept Vajpayee and the BJP grouping in power.
Just weeks after the new government took office, India shocked the world by undertaking five underground nuclear explosions, the first tests since 1974.
Vajpayee's announcement that the tests had taken place was made to popular acclaim in India and did much to boost the standing of the BJP.
He declared: "Our nuclear weapons are meant purely as a deterrent against nuclear adventure by an adversary."
However, the fears of many countries about India's action were strengthened when Pakistan carried out its own nuclear tests just weeks later.
The crisis in Kashmir, the mountainous territory between India and Pakistan claimed by both states, dominated Indian foreign policy.
Continual skirmishing between the armed forces of the two countries and Kashmiri separatists raised the spectre of an intensification of the conflict.
Throughout this period Vajpayee was constantly struggling to hold together a coalition of 17 diverse parties.
However, in the aftermath of the nuclear tests, he went out of his way to prevent any escalation of the conflict with Pakistan.
He boarded a bus to travel to the Pakistani city of Lahore for a remarkable summit with Nawaz Sharif, then Pakistan's prime minister.
The two men, both under immense pressure and politically weak, agreed a number of confidence-building measures although the problem of Kashmir remained.
In 1999 the BJP finally achieved a stable majority in parliament and Vajpayee was again sworn in as prime minister.
Tensions with Pakistan continued after the seizure of power by the Pakistani army under Gen Pervez Musharraf.
And in December 1999, an Indian airliner was hijacked by Pakistani militants en route from Kathmandu, the Nepalese capital, and Delhi and was flown to Afghanistan.
There was anger that the Pakistani authorities had allowed the aircraft to land and refuel in Lahore.
Vajpayee was forced to bow to the hijackers' demands and release a number of Kashmiri militants in return for the hostages on the plane.
A free marketeer by inclination, he was criticised by unions and civil servants for his policy of privatising some of India's government-owned corporations.
But his support for new hi-tech industries made India a global IT player and fuelled the country's economic expansion.
Tensions with Pakistan, never far below the surface, erupted again in 2001 after an armed attack on the Indian parliament building in Delhi.
Police later discovered that many of the militants involved were Pakistani nationals and Vajpayee sent half a million troops to the border with Pakistan.
The stand-off lasted two years before Vajpayee began to make new peace overtures to Islamabad with an exchange of visits by high-profile officials.
He also cemented Delhi's ties with Beijing by recognising Tibet as part of China and thereby improving Chinese investment in the Indian economy.
The BJP and its allies were widely expected to win the elections in 2004 but suffered a surprise defeat at the hands of Sonia Gandhi's Congress party.
A new Congress-dominated coalition took power with Manmohan Singh being sworn in as prime minister.
In 2005 Vajpayee announced he was retiring after more than 40 years in politics.
Like many Indian leaders before him, AB Vajpayee found himself having to hold together a sometimes fractious coalition to wield power.
But he was seen by many as a unifying force when divisions threatened Indian society and as a staunch defender of his country's borders.