Thais flooded social media with digital prayers while crowds kept vigil outside a Bangkok hospital for ailing King Bhumibol Adulyadej on Thursday as the deeply polarised nation faces the prospect of losing its figure of unity.
Bhumibol, 88, is the world's longest serving monarch, beloved by his people and portrayed by the palace as a guiding light through decades of political turmoil, coups and violent unrest.
He has been ill and hospital-bound for most of the last two years but his already frail health has taken a turn for the worse in the past week.
It is a major test for the country's generals, who seized power in 2014 vowing to restore stability after a decade of political chaos, a turbulent period exacerbated by the king's declining health as jostling elites competed for power.
The military has deep links with the palace and many inside the kingdom saw the putsch as a move to ensure generals could stamp down on any instability during the succession.
On Sunday and Wednesday the palace released two unusually grave health statements, saying Bhumibol was on a ventilator, battling kidney problems and that his condition was "not stable".
That sparked stock market jitters and prompted crowds of anxious devotees to gather outside the riverside hospital in Bangkok where he is being treated.
Around 500 people held prayers outside the hospital, many dressed in pink in the belief that the colour will bring the king good luck.
"I wanted to be close to him to pray for him because I love him," Anon Lim, 58, from northern Uttaradit province, told AFP. "He has done a lot for Thailand and for us."
Many burned incense sticks as they prayed and left flower garlands at the hospital.
Prepared but scared 
Sawitree Ampairat, 26, came straight to the hospital with a handful of colleagues after they all finished a night-shift at Bangkok's Suvarnabhumi airport.
"I wanted to do something for the king so I am here praying for him," she said. "My heart feels heavy hearing the news (that he is sick)."
Khomsan Prasertsri, a 48-year-old who runs a car rental business, was reading a prayer out loud.
"I can't imagine how we can live without the king," he told AFP after. "Thinking about not having him makes my heart drop. I don't know how to explain what it would be like without him."
Thais have had many years to get used to the prospect of no longer having Bhumibol as their king, he has not been seen by the public for a year.
But his passing will still be a huge shock to the nation.
Backed by an intense palace-driven personality cult, he is revered as a demigod by many, seen as a serene leader above the din of the kingdom's notoriously fractious political scene.
He built up a reputation for criss-crossing the nation to visit the rural poor and sometimes intervened to stop key moments of political violence -- although other times he stayed silent and he approved most of the army's many coups during his reign.
His 64-year-old son and named successor, Crown Prince Maha Vajiralongkorn, has yet to attain his father's widespread popularity.
Social media has lit up since Wednesday, with the hashtag #longlivetheking trending and people flocking to post prayers, some turning their profile pictures pink.
Princess Ubolratana, the king's eldest daughter, posted a picture of a yellow heart on a pink background with the words "Neecha Loves the King" on her Instagram feed early Thursday morning. Neecha is the online handle she uses.
Bhutanese King Jigme Khesar Namgel Wangchuk, a fellow Buddhist, also posted on his Facebook that special prayers would be conducted "in all the sacred temples throughout the country" for Bhumibol.
Tight control 
Bhumibol's health is a sensitive subject and palace officials maintain tight control over news about his condition.
A draconian lese majeste law also makes public discussion of the succession all but impossible.
The military's takeover in 2014 was its 12th successful coup since absolute monarchy was abolished in 1932.
The army has long portrayed itself as the ultimate defender of the monarchy and lese majeste prosecutions have surged since their takeover.
They say their putsch was to end political corruption.
In a briefing note to clients this week, risk consultancy firm BMI Research said the king's passing would likely create "more financial market volatility as well as a period of economic gridlock amid an extended official mourning period".
However the note added that any succession was likely to be "relatively smooth with the junta maintaining a tight grip on power".
Related Story