Thailand's revered King Bhumibol Adulyadej passed away on Thursday, ending a remarkable seven-decade reign as the world's longest ruling monarch who was considered a demigod and seen as a unifying force in the deeply polarised country.
He was 88.
The king passed away at 3.52 pm (local time) at the Siriraj hospital "peacefully", the palace said in a statement.
Crown Prince Maha Vajiralongkorn, Princess Maha Chakri Sirindhorn, Princess Soamsawali and Princess Chulabhorn were at the hospital, outside which hundreds of people had gathered for the past two days fervently praying for the widely revered king but broke down on the announcement of his demise.
The 63-year-old Crown Prince will succeed the king, Prime Minister Prayuth Chan-ocha said in a televised address.
"The day that Thai people didn't even dare think has come. This is our nation's greatest loss," said Gen Prayuth, wearing a black suit.
"The day that Thai people didn't even dare think has come. This is our nation's greatest loss," he said.
Prayuth also said Thailand would hold a one-year mourning period and urged all sectors in the society to refrain from holding entertainment activities for a month. Flags will be flown at half-mast for 30 days and government officials will wear black for a year.
"He is now in heaven and may be looking over Thai citizens from there," the premier said of King Bhumibol.
On Sunday, the palace had said that the king was in an "unstable" condition after receiving haemodialysis treatment and was on a ventilator battling a new infection.
The widely revered monarch is central to Thai society and was often treated as a virtual god. He was seen as a stabilising figure in a country hit by cycles of political turmoil and multiple coups.
The king's death comes as Thailand remains under military rule following a coup in 2014.
He was also known as Rama IX, as he was the ninth monarch of the Chakri Dynasty.
Having acceded to the throne 70 years ago, he has been a source of stability and unity for a much changed and still deeply divided nation.
King Bhumibol is the world's longest serving monarch, having acceded to the throne when his brother died in 1946.
During his seven decades on the throne, the king, who is seen as a unifying force, has intervened when events threatened to plunge Thailand into crisis.
Amid increasing concerns about his health in recent months, the Royal Household Bureau had issued more frequent bulletins.
The crowd of well-wishers praying for the king continued to swell outside Siriraj Hospital, where the monarch spent most of the last two years, as people also gathered at government offices nationwide for prayers.
People holding photographs of their loved King could be seen sobbing and some wailing even before an announcement was made.
Earlier, Prime Minister Prayuth cancelled an official trip to India to attend the BRICS Summit 2016, a Government House source said.
The premier was scheduled to attend the BIMSTEC Outreach at BRICS Summit 2016 on Sunday.
The source said Prayuth assigned Deputy Prime Minister Somkid Jatusriithak to attend the summit on his behalf.
Announcing that the Crown Prince will succeed King Bhumibol, Prayuth said "the government will proceed with the succession.
"The government will inform the National legislative Assembly that his Majesty the King appointed his heir on December 28, 1972," he said.
The assembly is due to hold a special session soon.
A palace statement said late yesterday that the king's "blood pressure lowered and breath quickened".
On Sunday, his blood test indicated that there had been an infection and abnormal function of his liver.
With most people unable to travel to Bangkok, interior permanent secretary Grisada Boonrach had ordered the proper arrangement of places at provincial halls, district offices and local administrative organisation offices nationwide for people to sign books.
Photograph: Damir Sagolj/Reuters
India, Russia to sign deal for S-400 anti-missile defence systems at BRICS
Raksha Mantri wants to 'reap profit' from surgical strikes
SEE: What Parrikar says about the Army
Military action doesn't guarantee poll gains
The communal mood in UP is turning ugly