Thailand's Prime Minister Prayuth Chan-ocha (center) and other officials attend a ceremony celebrating the birthday of Thailand's King Bhumibol Adulyadej outside the Grand Palace in Bangkok.Damir Sagolj/Reuters

Thousands of well-wishers in yellow shirts camped out in front of a Bangkok hospital on Friday for the 87th birthday of their king, who has lived at the hospital on and off since 2009. But King Bhumibol Adulyadej himself failed to show up to give a planned address, on the order of his doctors.

Besides the absence of the guest of honor, the celebrations were strange for another reason: With nearly seven decades in power, Bhumibol is the world's longest-serving head of state—and he's somehow achieved this milestone in a country that has seen more coups than most any other. By one count, there have been 10 since Bhumibol assumed the throne after his brother, the previous king, was found shot in the head in 1946. As elected leaders and military juntas have come and gone in Thailand with a frequency unrivaled in the world, King Bhumibol has held on at the very top, and he is frequently described as a "unifying force" in a country with deep political divisions. How has he done it?

The king's well-wishers outside Siriraj hospital in Bangkok (Damir Sagolj/Reuters)

In part, he's genuinely popular. "He's shown himself as really a man of his people," said Paul Handley, a journalist who reported from Thailand for 13 years and wrote a 2006 biography of the king. Listed by Forbes as the world's richest monarch, worth some $30 billion in 2011, Bhumibol has presented himself as a friend to Thailand's poor, with well-publicized efforts to improve rural development, health care, and education. A combination of authentic dedication and professional image management, Handley told me, have helped build up a strong reputation for the king over a period of decades.

But it's not quite that simple, and it's impossible to know exactly how popular, or how unpopular, the king really is. Thailand criminalizes speaking ill of the royal family, which means reliable polling is out of the question. The "lèse-majesté" law carries a sentence of up to 15 years in jail for anyone who "defames, insults or threatens the king, the queen, the heir-apparent or the regent." The law may help protect the king's image and reinforce his popularity, but its enforcement also provides an imperfect window into the anti-monarch sentiment that exists in the kingdom. As David Streckfuss, author of a 2011 book on lèse-majesté in Thailand, wrote in World Politics Review this year, the number of lèse-majesté cases has "skyrocketed to never-imaginable heights" recently. In the wake of a 2010 army crackdown on anti-government protesters that left nearly 100 people dead, Streckfuss wrote, "[c]riticism of the monarchy went viral on the Internet, overwhelming government censors, who closed more than a million websites."

The law also makes the monarchy's own role in Thailand's coups—many of which, Handley wrote in his book, "took place in the throne's name and with the palace's quiet nod"—difficult to discuss publicly within the country. The law is now being employed by Thailand's ruling military junta, which took power in a coup in May, to suppress dissent and demonstrate the military's allegiance to the popular monarch. Just this week, a former member of parliament was sentenced to two and a half years in jail for comments made in a May speech entitled "Stop Overthrowing Democracy."

Given the king's fragile health, the lèse-majesté law has also deepened the mystery and anxiety among Thais surrounding who will succeed him. Many Thais have never known another king. The crown prince, Bhumibol's likely heir, has a less sterling public image; Joshua Kurlantzick of the Council on Foreign Relations provided this partial list of his "foibles":

[T]he crown prince allegedly used his own planes to [block] the plane of a visiting Japanese prime minister on the tarmac in Bangkok in a fit of pique, threw a lavish birthday party for his pet dog at which his wife appeared topless in a leaked video, and stormed home early from a visit to Japan after he felt subjected to a series of minor protocol slights by Thailand’s most important investor.

All of this suggests that the remarkable stability of Bhumibol's own position, even as the political ground beneath him has shifted repeatedly, may not be reproducible in the years to come. Thailand's monarchy itself has not been immune from the country's coups; a 1932 coup overthrew the kingdom's absolute monarchy in favor of a constitutional monarchy. As Streckfuss has noted, the king's "personal popularity does not necessarily translate into legitimacy conferred to the institution. ... It may well be that for many Thais 'loyalty to the throne' extends no further than the present reign."

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.