Uzbek President Islam Karimov, who the government said on Friday had died aged 78 after suffering a stroke, saw himself as the protector of his Central Asian nation against the threat of militant Islam. To his critics, he was a brutal dictator who used torture to stay in power.
Karimov, who steered his former Soviet republic to independence from Moscow in 1991, tellingly chose Tamerlane, the 14th century Central Asian ruler and conqueror with a penchant for mass murder, as Uzbekistan's national hero.
Karimov brooked no dissent during his 27 years at the helm, stubbornly resisted pressure to reform the moribund Uzbek economy and jealously guarded his country's independence against Russia and the West.
In a typically feisty rebuff to Western calls to respect human rights, Karimov said in 2006: "Do not interfere in our affairs under the pretext of furthering freedom and democracy, Do not ... tell us what to do, whom to befriend and how to orient ourselves."
Under his rule, Uzbekistan, a country of 32 million people straddling the ancient Silk Road that links Asia and Europe, became one of the world's most isolated and authoritarian nations.
Karimov regularly warned of the threat posed by militant Islamists to the stability of the vast, resource-rich Central Asian region, but his critics accused him of exaggerating the dangers to justify his crackdowns on political dissent.
"Such people must be shot in the head," he said of the Islamists in a speech to parliament in 1996. "If necessary, if you lack the resolve, I'll shoot them myself."
Uzbekistan's relations with the United States and the European Union were frozen after his troops brutally suppressed a popular uprising in the eastern town of Andizhan in May 2005. Hundreds of civilians were killed, according to reports by witnesses and human rights groups.
Karimov shut down a U.S. military air base in Uzbekistan, established after the 9/11 attacks by al Qaeda on the United States. The West imposed a set of sanctions on Uzbekistan and slapped a visa ban on senior Uzbek officials, prompting Karimov to seek improved ties with Soviet-era overlord Russia.
But as the West slowly softened its stance on Uzbekistan, a producer of cotton, gold and natural gas, Karimov provided a vital transit route for cargo supplies for the U.S.-led war in neighbouring Afghanistan.
As ties with Russia again grew strained, Uzbekistan in 2012 suspended its membership of the Moscow-led Collective Security Treaty Organisation, which groups several ex-Soviet nations and is seen by some analysts as a regional counterbalance to NATO.
Karimov was born on Jan. 30, 1938, the son of a Tajik mother and Uzbek father. He grew up in a state orphanage and later rose swiftly through the ranks of the Soviet Communist Party.
He was a Soviet Politburo member and Uzbek Communist Party chief from 1989 until the Soviet Union collapsed in 1991.
After independence, the economy remained tightly regulated by the state despite pressure from the International Monetary Fund and other bodies to introduce market reforms and liberalise the foreign exchange market.
Karimov kept local media tightly muzzled and banned major foreign media outlets such as the British Broadcasting Corporation from operating in the country.
Human Rights Watch said in March 2011 it had been forced to shut its local office after 15 years in the country, saying its researchers had been denied visas and work accreditations.
Giving detailed descriptions of several cases of torture in Uzbek jails, including of pious Muslim believers, HRW said: "Confessions obtained under torture are often the sole basis for convictions."
"Methods commonly used include beatings with truncheons, electric shock, hanging by wrists and ankles, rape and sexual humiliation, asphyxiation with plastic bags and gas masks, and threats of physical harm to relatives," it said.
In a blow to Uzbekistan's old commercial traditions, Karimov shut down many open-air markets -- a source of news and gossip as well as income for many -- as part of a campaign against what he described as black market trade.
Just as in Soviet times, to avoid being overheard by neighbours, Uzbeks resorted to the privacy of their kitchens for whispered discussions about politics.
Karimov has two daughters. One of them, Gulnara, tried to position herself as a pop star at home and an international socialite, becoming one of the most powerful people in Uzbekistan and reportedly controlling a vast business empire.
But several media, including the BBC, reported in 2014 that she had been placed under house arrest, and Gulnara has not appeared in public since then.
Her younger sister Lola Karimova-Tillyaeva has risen to public prominence, serving as Uzbekistan's ambassador to the Paris-based UNESCO. She told the BBC in 2013 she had not spoken to Gulnara for 12 years.
Some in Uzbekistan saw dark symbolism behind Karimov's choice of Tamerlane, the mediaeval Central Asian ruler, as the Uzbek national hero instead of Tamerlane's grandson Ulughbek, a liberal-minded reformer.
"The Almighty bestowed much grace on our people, our nation, by sending us a man as great as Amir Temur (Tamerlane)," Karimov said in a 1996 speech. "We must thank the Creator 1,000 times for this."
(Writing by Dmitry Solovyov; Editing by Gareth Jones)