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

Thousands of Thai mourners are lining the streets of Bangkok, hoping to see the body of King Bhumibol Adulyadej as it it moved from a hospital to a temple in the Grand Palace.

The world's longest-reigning monarch died on Thursday aged 88, sparking a national outpouring of grief.

The government has declared a year-long official mourning period.

Crown Prince Maha Vajiralongkorn has been named as successor, but has asked for a delay in the process.

The cabinet has declared Friday a government holiday, and flags are to fly at half-mast for the next 30 days.

People have been asked to wear black, and avoid "joyful events" during this period. Cinema screenings, concerts and sports events have been cancelled or postponed.

Image caption Thousands have lined the streets of Bangkok for the funeral procession

Image copyright AP Image caption Thais who have known the king as a stable point amid years of upheaval have been left shocked by his death

News websites have turned their pages black and white, and all television channels in Thailand are airing programmes about the king's life.

"This is the worst loss in my life," said one of those lining the streets.

"I am confident that what he did for us improved our lives," said another.

"What we are doing now [waiting on the streets], is nothing compared to what he did for us."

Preparing to mourn - Jonah Fisher, BBC News, Bangkok

Image copyright Jonah Fisher Image caption Soldiers in ceremonial outfits and hats have gathered outside the palace to receive the king's procession

From early in the morning there were long queues leading to Bangkok's Grand Palace.

Dressed in black, tens of thousands of Thais have been standing in the baking sun to participate in the first rituals of the mourning period.

Banners are being put up along the route that the king's cortege will follow.

Soldiers dressed in ceremonial outfits have been gathering outside the palace, where the grass appears to have been freshly laid overnight.

The king's body will be moved from Siriraj Hospital to the Temple of the Emerald Buddha in the Grand Palace.

Later in the evening on Friday, the Crown Prince will conduct the bathing ceremony of the king's body, a traditional Thai Buddhist funeral rite.

Image copyright Reuters Image caption The king is highly beloved by Thais, many of whom regard him as semi-divine

Image caption Street vendors in Bangkok are selling black T-shirts to mourners

The king had been ill for a long time. When news of his death was announced on Thursday evening, many in the large crowds outside the hospital where he died broke down.

King Bhumibol was widely respected across Thailand, and thought of by many as semi-divine.

He earned the devotion of Thais for his efforts to help the rural poor, such as agricultural development projects, and works of charity.

The monarch was also seen as a stabilising figure in a country often wracked by political turmoil.

Image copyright EPA Image caption There were scenes of intense grief outside the hospital as news broke that he had died

Image copyright Getty Images Image caption Large crowds of mourners attended a funeral rite on Friday morning

Thailand remains under military rule following a coup in 2014.

The country has suffered from political violence and upheaval over the past decade, as well as a long-running Muslim separatist insurgency in the southern provinces which sees regular small-scale bomb attacks.

Though a constitutional monarch with limited official powers, many Thais looked to King Bhumibol to intervene in times of high tension. He was seen as a unifying and calming influence through numerous coups and 20 constitutions.

However, his critics argued he had endorsed military takeovers and at times had failed to speak out against human rights abuses.

Heir's challenge

The crown prince, who is 64, is much less well known to Thais and has not attained his father's widespread popularity. He spends much of his time overseas, especially in Germany.

While the Thai Prime Minister Prayuth Chan-ocha has said the crown prince will ascend the throne next, there is uncertainty over when that will happen after the prince asked for a delay in succession.

Profile: Crown Prince Vajiralongkorn

Image copyright AFP Image caption Most ordinary Thais know only a few details about Crown Prince Vajiralongkorn

Strict lese-majeste laws protect the most senior members of Thailand's royal family from insult or threat. Public discussion of the succession can be punishable by lengthy jail terms.

Given the pivotal role the king has played in maintaining the balance of power in Thailand's volatile political environment, the succession will be a formidable challenge for the government, says the BBC's Jonathan Head in Bangkok.