Media playback is unsupported on your device Media caption The BBC filmed the preparation for the funeral over almost a year

Big crowds are gathering for a five-day funeral ceremony for Thailand's revered King Bhumibol Adulyadej, who died last October aged 88.

The monarch will be cremated in Bangkok on Thursday, in a royal pyre representing heaven.

Preparations - including the building of a vast cremation complex near the Grand Palace - took almost a year.

The king was seen as a stabilising figure in a country hit by cycles of political turmoil and multiple coups.

Image copyright Getty Images Image caption Many people camped overnight, braving a heavy rain

Image copyright JONATHAN HEAD Image caption Ceremonies and preparations have been ongoing since the death of the king

The elaborate Buddhist funeral ceremony is expected to draw as many as 250,000 people from across Thailand.

Many arrived early, camping in makeshift tents to hide from a tropical downpour.

"I travelled here two days ago so that I could be the first to get a good spot," a 72-year-old woman from northern Thailand told Reuters on Tuesday.

Media playback is unsupported on your device Media caption Jonathan Head looks back at the reign of King Bhumibol Adulyadej

On Wednesday, a merit-making ceremony inside the Grand Palace marked the start of the funeral.

The cremation will be held on Thursday. King Maha Vajiralongkorn, the late monarch's son, will light the pyre.

Bhumibol Adulyadej's ashes will then be collected and transported back to the palace on Friday. Two more days of ceremonies will follow.

Members of royal families and dignitaries from more than 40 countries will attend the cremation, while huge crowds are expected to line the nearby streets.

The funeral ceremonies come with strict guidelines for those attending.

Thailand's lese-majeste law, which forbids the insult of the monarchy, is among the harshest in the world.