Thai people were in tears across the nation after the death of their beloved King Bhumibol Adulyadej, the country's unifying figure and the world's longest-reigning monarch.
Hundreds of people gathered at Bangkok's Siriraj Hospital, where 88-year-old Bhumibol had been treated for a variety of ailments for much of the past decade.
Many sobbed loudly, clutching each other in anguish and shouting "long live the king".
Tributes flooded in from across the world, with Prime Minister Theresa May expressing "my sincere personal condolences to the royal family and the people of Thailand".
"His Majesty guided the Kingdom of Thailand with dignity, dedication and vision throughout his life. He will be greatly missed," she said.
US president Barack Obama said King Bhumibol was a tireless champion of his country's development and showed an "unflagging devotion" to improving the standard of living for the Thai people.
Mr Obama said the king leaves behind a legacy of care for the Thai people that future generations will cherish.
German chancellor Angela Merkel said Bhumibol had "worked tirelessly for the welfare of the Thai people" and steered the country through "political and economic crises".
French president Francois Hollande hailed the king for his "exceptional human qualities". "His profound sense of justice, his care for modernity and sustainable development that earned him the affection of the Thai people, as well as the world's esteem," he said.
Dutch King Willem-Alexander praised him for "emphasising the values of harmony and peaceful cooperation in his country".
The Thai government announced a 100-day mourning period and a 30-day moratorium on state events. His son, Crown Prince Maha Vajiralongkorn, is to succeed him on the throne.
Prime Minister Prayuth Chan-ocha said Vajiralongkorn had asked for a delay in proclaiming him king so that he can take time to mourn along with the people of Thailand.
"He said at present, he is the heir apparent. But he would like to take some time to mourn, together with the people of Thailand," he said.
Most Thais had seen no other king in their lifetime and thought of Bhumibol, who reigned for 70 years, as their father and the embodiment of goodness and godliness.
"There is no word to explain my feeling right now," Gaewkarn Fuangtong, a humanitarian worker, said in Bangkok's financial district.
"I lost one of the most important people in my life. I feel like I haven't done enough for him. I should have done more. I will do good, do better for his sake."
Although a constitutional monarch, he wielded enormous political power and served as a unifying figure during Thailand's numerous political crises.
But in recent years, he suffered from a variety of illnesses that affected his kidneys, brain, lungs, heart and blood.
"Since I was young I saw him work really hard, and now it's hard to explain. I feel numb inside," said Danaiwut Wiroonpiti 26, a photographer who was crying outside the Grand Palace where the king's body will be taken in a procession Friday.
"He's the centre of all Thai people. It's like we lost the main pillar of our lives, the person who holds us together. I can't hold my tears."
Portraits of Bhumibol displayed in most Thai homes and businesses often depict him in arduous travels to remote villages, where he often went to see the situation of his subjects first hand.
But recently, whenever Bhumibol appeared in public, he was in wheelchair, waving feebly at his subjects. Even those rare appearances stopped as he became confined to the hospital.
Through his illness he was notably silent about the political upheaval that has shaken Thailand in recent years.
On Sunday, the palace announced his health had become "unstable" and yesterday Vajiralongkorn rushed back from Germany, Mr Chan-ocha canceled a trip abroad and royal family members began gathering at Siriraj hospital.
He died a little before 4pm local time on Thursday, the palace said. His death was announced three hours later in a broadcast carried simultaneously by all TV stations.
"Even though the board of doctors has closely monitored and treated him to the best of its abilities, the king's condition never improved," the palace said. It said he passed away peacefully.
"He is now in heaven and may be looking over Thai citizens from there," the statement said. "He was a king that was loved and adored by all. The reign of the king has ended and his kindness cannot be found anywhere else."
Bhumibol Adulyadej became king in 1946. He anchored the Southeast Asian country through violent upheavals at home and communist revolutions next door with a blend of majesty and a common touch.
There is great concern about the succession, since Vajiralongkorn has not earned the same respect as his father.
A special meeting of the National Legislative Assembly, Thailand's parliament, has been planned.