Black-clad mourners thronged Bangkok's historic quarter before dawn on Thursday ahead of the cremation of king Bhumibol Adulyadej, a revered monarch whose passing after a seven decade reign plunged Thailand into a year of grieving.
Bhumibol's son and heir, King Maha Vajiralongkorn, will light the pyre at the heart of a spectacular golden pavilion at 10pm (1500 GMT).
The ceremony will be attended by a 'Who's Who' of Thai power -- royals, generals and establishment figures -- as well as scores of foreign dignitaries.
The lavish $90 million funeral will give the public a chance to bid an emotional farewell to a king who was crowned in 1950 and soared over decades of Thai history, before his death last October aged 88 seeded uncertainty in a country ruled by a divisive junta.
A brew of palace propaganda and a harsh lese majeste law burnished the king's reputation throughout his reign.
But Bhumibol's intimate relationship with his subjects is beyond question.
That connection was on display on Bangkok's streets late Wednesday as tens of thousands braved late monsoon rains to camp out near the cremation site.
"He reigned for 70 years and did a lot for all the people," said 54-year-old Samruan Amma.
"I don't have anything to repay him. I have only my loyalty."
The cremation will follow a day of sombre processions, colourful pageantry and Buddhist ritual to honour Rama IX of the Chakri dynasty, as Bhumibol was formally known.
Bhumibol was a rare constant in a politically combustible country, stuck on a carousel of violent protests, short-lived civilian governments and coups.
Political turmoil threw up an endless supply of junta leaders and prime ministers, but all lacked Bhumibol's moral capital with the Thai people.
He left behind one of the world's richest monarchies, that stands at the apex of one of Southeast Asia's most unequal societies.
The new king will be crowned after his father's funeral.
He is yet to win the same affection among a Thai public who saw Bhumibol as "father of the nation".
It was an image careful curated by palace PR, cementing the king's reputation as austere, benevolent and incorruptible despite the fast changing times.
Thailand's royal defamation law shields the monarchy from criticism, carrying 15 year jail sentences for each charge.
That law makes independent analysis and frank public debate about the monarchy impossible inside Thailand.
In effect it means the monarchy "has monopolised the way the Thai public can think about its own political story," historian David Streckfuss told AFP.
The ruling junta has jailed record numbers of people under the law since seizing power in a 2014 coup.
Aged just 18 when he ascended the throne, the US-born Bhumibol became the fulcrum of the monarchy.
The crown flourished with heavy US-backing as Washington sought a bulwark against the spread of Communism across Southeast Asia.
Just as Thais have donned black for much of the last year, they are expected to wear colourful clothes once the funeral rituals are over -- celebrating the king's ascent to Mount Meru, the centre of the universe in Buddhist, Hindu and Jain cosmology.