Until 1932, Thailand had been ruled by an absolute monarchy, with the king exercising power over the judiciary
The people of Thailand are mourning the death of King Bhumibol Adulyadej, their head of state for 70 years and the world's longest-reigning monarch.
An emotional crowd held a late-night vigil in Bangkok for the king, who died on Thursday aged 88.
His body is to be moved to the city's Emerald Temple later on Friday. The official mourning will last a year.
Crown Prince Maha Vajiralongkorn is to be the new monarch, but has asked for a delay before taking over the role.
Flags are to fly at half-mast for 30 days and the government has asked for "joyful events" to be halted for 30 days.
King Bhumibol was seen as a stabilising figure in a country hit by cycles of political turmoil and coups.
He was widely respected across Thailand, and thought of by many as semi-divine.
He 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.
The BBC's Jonah Fisher in Bangkok says the king was Thailand's father figure, a beacon of stability in a divided and worried country. A more uncertain era has begun, he adds.
Crowds outside the hospital wailed with grief when the announcement was made
As night fell, crowds of mourners remained at the hospital where the king died
The king's death comes as 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 from bomb attacks blamed on Muslim separatists from southern provinces.
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.
Although the prime minister said Crown Prince Maha Vajiralongkorn would become the new monarch, he added that the official proclamation would be made at a later date.
He said the crown prince had confirmed that he would perform his duty as heir to the throne, but had asked for time to mourn his father's death.
Most ordinary Thais know only a few details about Crown Prince Vajiralongkorn
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.
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.
-- Courtesy of BBC Sport