ALMATY (Reuters) - Islam Karimov, president of Uzbekistan for the past quarter of a century, was buried in his home city of Samarkand on Saturday, leaving behind a power vacuum in a nation that serves as a bulwark against militant Islam in Central Asia.
Karimov, who was 78, died from a stroke. After a funeral rite in Samarkand's ancient Registan square attended by hundreds of men - some of whom were in tears - his body was buried at the city's Shah-i-Zinda cemetery, two attendees told Reuters.
Karimov was derided by Western governments as a dictator who violated human rights, but for many people in Uzbekistan, a mainly Muslim ex-Soviet state which borders Afghanistan, he is the only head of state they have ever known.
With no obvious successor, Karimov's death has triggered an outpouring of grief, mixed with uncertainty about the future.
"I still can't believe it happened," said a 39-year-old resident of the capital, Tashkent, who was among thousands who lined the main thoroughfare early on Saturday to watch the funeral cortege pass by en route to Samarkand.
"I don't know what happens now, I am lost," said the man, who declined to be identified.
How the power vacuum is filled in Uzbekistan is of urgent concern to Russia, the United States and China, all powers with interests in the volatile Central Asia region, where Uzbekistan is the most populous state.
Central Asia analysts say a small circle of senior officials and Karimov family members will have been meeting behind closed doors to try to agree on anointing a new president.
The funeral rites offered clues as to who might be in the running. At the Samarkand ceremony, Prime Minister Shavkat Mirziyoyev, 59, and Finance Minister Rustam Azimov, 57, were allocated spots in the front row, nearest to Karimov's coffin.
If the elite fail to agree among themselves on a transition, the resulting instability could be exploited by Islamist militants who in the past have staged violent attacks in Uzbek cities and want to make Uzbekistan part of an Islamic caliphate.
Karimov jailed, killed or exiled most of the Islamist fighters inside Uzbekistan. Many have since joined the Taliban in Afghanistan and Islamic State in Iraq and Syria, where they have become battle-hardened.
An upsurge in Islamist violence in Uzbekistan would pose a threat to the United States, which is trying to contain the insurgency in Afghanistan, to Russia - home to millions of Uzbek migrant workers - and to China, which worries about Central Asian Islamists making common cause with separatists from its mainly Muslim Uighur ethnic minority.
Many people had anticipated that Karimov would be succeeded by his older daughter Gulnara, a businesswoman and pop star, but she fell from favor two years ago and there was no sign of her on Saturday among the family members in the funeral cortège.
At Tashkent airport, as the coffin was being loaded onto a plane bound for Samarkand, Karimov's wife, Tatiana, and his younger daughter, Lola Karimova-Tillyaeva, stood at the foot of the aircraft steps. His daughter, dressed all in black, was dabbing her eyes with a white handkerchief.
Karimov's death could unleash a new round of jockeying between Russia, the United States and China, which are all trying to bring Central Asia, with its oil and gas reserves and metal ore, into their sphere of influence.
In a statement offering his condolences, U.S. President Barack Obama said his country stood with Uzbekistan as it "begins a new chapter in its history".
Alexei Pushkov, the pro-Kremlin head of the foreign affairs committee in Russia's parliament, responded on Twitter that Obama was "mistaken if he thinks the new chapter is going to be written in Washington".
The most prominent foreign dignitaries at the funeral were Afghan President Ashraf Ghani, Tajikistan's President Imomali Rakhmon and Russian Prime Minister Dmitry Medvedev.
Karimov was the head of the local Communist party in Uzbekistan when it was still a Soviet republic, and he remained at the helm after the Soviet Union collapsed in 1991.
While other newly-independent Soviet republics were convulsed by wars, economic upheaval and political turmoil, life for people in Uzbekistan stayed largely stable, safe and predictable -- a state of affairs that Karimov's supporters touted as his great achievement.
"The people of Uzbekistan associate the huge achievements of the country since independence with President Karimov's name," a state television anchor, in a black suit and tie, said on Saturday in an elegy that was preceded by somber music.
But the stability came at a cost.
Elections were held but were not democratic, according to international observers. To ensure Uzbekistan could earn foreign currency from exporting cotton, people -- including children -- were press-ganged into going into the fields to help with the harvest, witnesses have told Reuters.
Citing an Islamist threat, Karimov cracked down ruthlessly on anyone deemed to be a religious extremist. Growing a beard or renouncing alcohol was sometimes enough to earn arrest. Rights groups say detainees were tortured.
In the Uzbek city of Andizhan in May 2005, security forces killed around 500 mostly unarmed people who had been protesting against local officials, witnesses and rights groups said. Karimov put the death toll at 169 and said his forces had put down an armed uprising.
Karimov's own family were not immune from the harsh treatment. In a letter smuggled to a BBC journalist in 2014, Gulnara, the older daughter, alleged she was being held under house arrest by her father's security officials after her family ostracized her.
Additional reporting by Mukhammadsharif Mamatkulov in Tashkent; Writing by Olzhas Auyezov and Christian Lowe; Editing by Gareth Jones