Thais have flocked to Siriraj Hospital in Bangkok to pray for the health of King Bhumibol Adulyadej. Thailand's 86-year-old king has undergone surgery to have his gallbladder removed.

Thailand King Bhumibol
October 5, 2014: A woman prays for the health of Thailand's revered King Bhumibol Adulyadej at the Siriraj hospital in BangkokReuters

The world's longest reigning monarch was admitted to hospital with symptoms of fever and an increased heart rate and signs of an infection. The palace said additional testing, including a CAT scan, showed the king's "gallbladder was inflamed and very swollen" and doctors performed a 75-minute laparoscopic operation.

Doctors said the procedure went well and the monarch's overall condition had improved since he was hospitalised.

Worries about the revered king's health and succession have contributed to Thailand's political instability over the last eight years.

The king spent almost four years in the hospital until leaving in August last year. When he was admitted in 2009, doctors said he was suffering from a lung inflammation, though he also suffers from a variety of ailments usually associated with age.

Thailand King Bhumibol
March 11, 2009: King Bhumibol Adulyadej arrives at Siriraj Hospital in Bangkok for a medical examinationReuters
Thailand King Bhumibol
March 12, 2009: Wellwishers hold portraits of Thailand's King Bhumibol Adulyadej at Siriraj Hospital in BangkokReuters
Thailand King Bhumibol
October 23, 2009: King Bhumibol Adulyadej makes an appearance at Siriraj Hospital in Bangkok. The world longest reigning monarch had been at the hospital for a month and was undergoing treatment for fever, lung infection and a loss of appetiteReuters
Thailand King Bhumibol
December 5, 2009: A wellwisher holds a lit candle and a portrait of King Bhumibol Adulyadej at Siriraj Hospital. Thailand's ageing monarch addressed the nation for the first time since hospitalisation more than two months previously, marking his 82nd birthday with a call for "calm" in the politically turbulent countryReuters
Thailand King Bhumibol
December 5, 2009: Members of the public hold up candles in tribute to King Bhumibol Adulyadej outside the Siriraj HospitalGetty
Thailand King Bhumibol
December 5, 2009: King Bhumibol Adulyadej arrives back at the hospital after a ceremony to mark his 82nd birthday at the Grand Palace in BangkokReuters
Thailand King Bhumibol
December 5, 2010: Women hold pictures of King Bhumibol Adulyadej as they wait for him to return to Siriraj Hospital after a ceremony held to mark his 83rd birthday at the Grand PalaceReuters
Thailand King Bhumibol
December 5, 2011: Princess Maha Chakri Sirindhorn assists King Bhumibol Adulyadej as he delivers a speech to mark his 84th birthday from the balcony of the Grand PalaceReuters
Thailand King Bhumibol
December 5, 2011: A woman cries after seeing King Bhumibol Adulyadej as he returns to Siriraj Hospital in BangkokReuters
Thailand King Bhumibol
December 5, 2012: King Bhumibol Adulyadej arrives back at the Siriraj Hospital, after a ceremony held to celebrate his 85th birthday at the Anatasamakom Throne Hall in BangkokReuters
Thailand King Bhumibol
August 1, 2013: People shouting "Long live the king" wait for King Bhumibol Adulyadej and Queen Sirikit to leave Siriraj hospital in Bangkok. The world's longest-reigning monarch left the hospital where he had been for almost four yearsReuters
Thailand King Bhumibol
August 1, 2013: King Bhumibol Adulyadej and Queen Sirikit leave Siriraj hospital in BangkokReuters
Thailand King Bhumibol
August 6, 2014: King Bhumibol Adulyadej arrives at Siriraj hospital in Bangkok for a medical check-upAFP
Thailand King Bhumibol
September 15, 2014: People wave flags and pray as King Bhumibol Adulyadej leaves Siriraj hospital over a month after he was admitted for a check-upReuters
Thailand King Bhumibol
October 5, 2014: A woman prays for the health of Thailand's revered King Bhumibol Adulyadej after he was readmitted to hospital. The 86-year-old king was admitted for a high fever and the diagnosis suggested blood infection, the Bureau of the Royal Household said in a statementReuters
Thailand King Bhumibol
October 6, 2014: Thailand's Prime Minister Prayuth Chan-ocha, his wife Naraporn Chan-ocha (2nd R) and his cabinet pray for the health of Thailand's revered King Bhumibol Adulyadej at the Siriraj hospital in BangkokReuters
Thailand King Bhumibol
October 6, 2014: Ousted Thai prime minister Yingluck Shinawatra bows to a portrait of King Bhumibol Adulyadej as she pays her respects at the Siriraj hospital in Bangkok. Thailand's revered 86-year-old king has had his gall bladder removed, the palace saidAFP
Thailand King Bhumibol
October 7, 2014: Thais gather to pray outside Siriraj Hospital where King Bhumibol Adulyadej is recovering from surgery to remove his gall bladderAFP

Thais hold great affection for Bhumibol, who took the throne in 1946 and is revered as a moral authority who stepped in repeatedly over the years to unify the country despite his lack of a formal political role.

His fading from public life and the palace's perceived role in the nation's latest political battles that started in 2006 have tarnished the institution in recent years, undermining what had previously been near-universal respect for the royal institution.

The king's health has also raised concerns about what will happen after his passing. Crown Prince Vajiralongkorn does not command the same respect and affection as the king, who was closely and actively involved in his country's development efforts.

Open discussion of the monarchy is also constrained by strict lese majeste laws that make criticism of the monarchy punishable by up to 15 years in prison.