Thailand's revered King Bhumibol Adulyadej, the world's longest-reigning monarch, died Thursday.
The 88-year-old had spent most of the last decade in a hospital for a variety of ailments related to old age, including kidney and lung problems. He had not been seen in public since January.
The U.S.-born royal was a keen jazz saxophonist and held a patent for rain-making technology.
Bhumibol had been king since 1946 and his succession could be a tough test for Thailand, where the government is run by a military junta and where Crown Prince Vajiralongkorn has not earned the same respect as his father.
His death will plunge the coup-stricken country into more uncertainty as it maps its way back to some degree of civilian rule.
Who was King Bhumibol?
He was not only the world's longest-serving monarch but also the wealthiest, according to Forbes which has estimated his fortune at $30 billion — more than 100 times that of Britain's Queen Elizabeth.
Investments have allowed him to increase his wealth, despite ruling over a country regularly listed among the poorest in the world.
Bhumibol came to the throne in June 1946, meaning few Thais remember any other ruler. He took over at the age of 18 after his older brother was found shot dead in his bedroom.
Born in Cambridge, Mass., he was an accomplished saxophonist and jazz music composer who once shared a stage with Benny Goodman. He continued to play regularly until well into his 70s.
Perhaps most unusually, Bhumibol was a certified rain-maker. He held a European patent for "weather modification by royal rainmaking technology," described as a system of chemicals that can boost and move clouds in order to trigger rainfall.
Whatever his musical or scientific talents, Bhumibol was chiefly a successful ruler having retained power over a country that has experienced 19 coups or attempted coups since the end of absolute monarchy in 1932.
Why does it matter?
Although Bhumibol was a constitutional monarch with no formal political role, he was widely regarded as a unifying figure in Thailand and a symbol of continuity for a population that has lived through a string of governments ousted by military coups.
His death comes while the country is still mapping its way out of another constitutional crisis caused by a 2014 coup that established Thailand's military as the country's pre-eminent institution.
"The king is the heart of our country. So, without a heart, we cannot survive," Donnapha Kladbupha, a 42-year-old English tutor, told Reuters just before the announcement of Bhumibol's death.
It is hard to determine attitudes to the future of the monarchy because laws protecting the royals from insult make it a crime to defame, criticize or threaten the king, queen or heir to the throne.
The military junta has been making full use of the lese-majeste law — a French term for the crime of offending the dignity of a sovereign — in order to prevent criticism of the monarchy and suppress speculation about the suitability of Bhumibol's successor, Crown Prince Vajiralongkorn.
Two Thais last year received jail sentences of 25 years and 30 years over Facebook posts about Bhumibol and in 2014 the junta reportedly identified "Daily Show'" host John Oliver as an offender for mocking Vajiralongkorn on his show.
The revered monarchy certainly has a better reputation than the junta or the government it overthrew, both of which are blighted by accusations of corruption.
Earlier this month, critics of the junta filed a petition asking the office of the auditor-general to investigate why the defense minister and his entourage spent $600,000 on a chartered flight to a meeting in Hawaii.
The future stability of Thailand will depend on what happens in the coming weeks.
What happens next?
Crown Prince Vajiralongkorn, 63, has already taken over most of his father's ceremonial duties and palace officials have been preparing for his succession for some time.
The thrice-married prince and his family — two daughters from his first and second marriages, and a son from his third — have in recent months increasingly appeared on state television and in glossy magazines.
Earlier this year, city authorities in Bangkok erected gold-framed portraits showing the Crown Prince as a child with King Bhumibol, the pair wearing matching suit and ties. Others showed him as an adult standing next to his father.
"There are more portraits of the Crown Prince now than a few years ago," a palace source told Reuters in February. "This is not by chance, but it is a way to try to pre-empt any future instability."
Evening news bulletins on state television channels, which carry daily segments on the royal family, also have increasingly featured the prince — including coverage of his trips abroad and attendance at seminars, sporting events and fashion shows.
However, Vajiralongkorn does not appear to enjoy the same reverence as his father.
A Council for Foreign Relations paper in 2014 noted that he has "for decades acquired a reputation as an alleged hothead, womanizer, and poor decision-maker, in contrast to Bhumibol, who despite flaws has generally been a moderating influence on the kingdom."
How will Thailand be run?
Even without the uncertainty of a royal power transfer, the country is heading for a period of political turmoil.
Thailand voted overwhelmingly in August to accept a constitution crafted by the junta, paving the way for elections — but very much on the military's terms.
Under the new constitution — the country's 19th since 1932 — a 250-member upper house Senate will be appointed by the military and six seats will be reserved for the heads of the armed forces and police.
The military will need at least 125 lawmakers from the elected lower house to join the appointed senators in voting for a non-elected prime minister.
The constitution will allow the military to retain extensive powers during a transition period following the general election.
The junta insists it is not interested in staying in power beyond 2017 and has repeatedly stated that the first post-coup election will take place next year.
The State Department has urged Thai authorities return the country to an elected, civilian-led government as soon as possible.
"We strongly urge the government to lift restrictions on civil liberties, including freedom of expression, the right to peaceful assembly," spokeswoman Elizabeth Trudeau said at a briefing in August.