Sombre crowds began gathering to pay final respects to Thailand's late King Bhumibol Adulyadej, braving a tropical downpour to camp out along the funeral procession route for a monarch who died last year and was revered by some as a demi-god.

The five-day Buddhist ceremony, which begins on Wednesday, has taken nearly a year to prepare and 3 billion baht ($90 million) has been set aside to pay for the funeral.

Arriving a day early to guarantee their place for a funeral that is expected to draw 250,000 people, mourners pitched flimsy tents in the middle of Bangkok's old quarter to provide some protection from the torrential rain.

Hotels in the old town neighborhood have been booked up weeks in advance, and a national holiday has been declared for Oct. 26, the day of the cremation.

Although he was a constitutional monarch, King Bhumibol Adulyadej has been credited with reviving the prestige of the monarchy.

Aged 88 when he died, the king was viewed by many people a pillar of stability in the politically turbulent Southeast Asian country, where a military junta currently holds power.

The king's cremation site, which features gold-tipped pavilions built for the occasion, is a stone's throw from the Grand Palace, popular with foreign tourists.

Even though the funeral had yet to begin, many of the people gathering had tears in their eyes and were visibly emotional. Hunched beneath a makeshift tent made of cloth and string, Chalermporn Paebutr, a 72-year-old woman from northern Thailand, described her determination to bid farewell to a much-loved monarch.

‘I traveled here two days ago so that I could be the first to get a good spot,’ she told Reuters. ‘We only have to brave the rain for a few days. This is worth it if we can be near him one last time.’

Around 1,000 people had camped overnight in the downpour, police said on Tuesday. Some only had their plastic raincoats for protection.

Thailand has suffered floods since Oct. 10. Nine people have died, and 19 of the country's 77 provinces have been hit affected.

‘The floods will not affect the cremation ceremony in any way,’ interior minister Anupong Paochinda told reporters.

New King Maha Vajiralongkorn, the late king's only son, will lead the cremation ceremony.

Thailand has a harsh law, known as Article 112, against insulting the monarchy, and prosecutions have skyrocketed since the junta came to power following a coup in 2014.

The United Nations has voiced concern over the use of the law to clamp down on free speech and has repeatedly called on Thailand to amend it.