BANGKOK, Oct. 13 (Xinhua) -- Thai King Bhumibol Adulyadej has died at the age of 88, the Bureau of Royal Household said on Thursday.

His majesty passed away peacefully at 3:52 p.m. (0852 GMT) on Thursday at Siriraj Hospital in Bangkok, the bureau said in a statement.

All royal family members were in attendance at the time.

The ninth king of the Chakri Dynasty ascended to the throne when he was 19 and was the world's longest-reigning monarch.

The king had been admitted to the Siriraj Hospital since October 2014.

Thais outside the hospital burst into tears and kept chanting "long live the king" and singing the national anthem as soon as they heard the heartbreaking news.

The Thai government ordered all official buildings, state-owned enterprises and schools to fly a half-mast flag for 30 days since Friday and announced a one-year mourning period.

Prime Minister Prayuth Chan-ocha said Crown Prince Maha Vajiralongkorn will be the next king under the constitution.