Heydar Aliyev was a colossus on the stage of Azerbaijani politics for more than 30 years.
Heydar Aliyev: Former KGB strongman and Politburo member
He took the top job in Soviet Azerbaijan in 1969, as First Secretary of the republic's Communist Party.
In 1982 he became the first Muslim in the Soviet Politburo in Moscow, but was kicked out during Mikhail Gorbachev's perestroika movement in 1987.
He did not spend long in the political wilderness, returning triumphantly to Baku in 1993 to put a stop to the country's nascent civil war.
He then ruled the country for a decade with a rod of iron - encouraging foreign investment while discouraging political pluralism.
Struggle for power
He won two presidential elections - neither regarded by international observers as fully free or fair - and originally said he would run for a third term as president this year.
But after collapsing publicly in the spring and checking into a US hospital in the summer, he announced in October that he would stand aside - in favour of his son Ilham, whom he had appointed prime minister.
But many people doubt whether Ilham has the makings of a strong leader, in his father's mould.
While Heydar Aliyev spent his youth in the cut-throat world of the Soviet KGB, Ilham has spent his accumulating wealth in the oil business. He has also been known to spend it in casinos.
Sooner or later, a messy struggle for power is widely anticipated.
In 1999 Heydar Aliyev appeared to be struggling with bad health, but bounced back after a major heart bypass operation in the US.
He later had prostate surgery and a hernia operation, but retained his razor-sharp memory and his ability to speak at length without notes.
His voice grew feebler and his breathing more laboured, but until this summer there was no outward sign of his willpower fading.
In an earlier health scare, in 1987 - after his removal from the Politburo, and the death of his wife - he suffered a heart attack.
His political career was thought to be over. But he realised more quickly than most that the Communist era was ending, and quickly refashioned himself as a moderate Azeri nationalist.
In Baku there had been rumours long before a collapse on live television in April that everything may not be right with the veteran leader, a self-confessed workaholic.
He moved last year from a villa in one of the suburbs to a house close to the presidential administration.
One result was that traffic was no longer held up as the presidential motorcade made its way across the city.
Another was that no one knew when he was at work, and when he was resting at home.