King Bhumibol Adulyadej, revered in Thailand as a demigod, a humble father figure and an anchor of stability through decades of upheaval at home and abroad, died Thursday. He was 88 and had been the world’s longest reigning monarch. The Royal Palace said Bhumibol died “in a peaceful state” at Siriraj Hospital, where he had been treated for various health problems for most of the past decade.

The widely revered monarch is central to Thai society and was often treated as a virtual god. The King 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.

During a reign that spanned 70 years, the US-born Bhumibol became much more than Thailand’s constitutional monarch. He was the nation’s one constant as myriad governments rose and fell, a gentle leader who used the influence of the throne to unify the nation and rally troops through the Cold War as Thailand’s neighbors fell under communist control. In his heyday, the frail-looking, soft-spoken man in spectacles wielded so much power and respect, he was able to squelch coups and rebellions with a gesture or a few well-chosen words.

Bhumibol was viewed by many in the majority Buddhist nation as a bodhisattva, or holy being who delays entering nirvana to aid the human race. But while junta leaders, prime ministers and courtiers approached him only on their knees, Bhumibol was remarkably down-to-earth. He rolled up his sleeves and hiked into impoverished villages and remote rice paddies to assess the state of his country and help resolve everything from water and food shortages to family squabbles. He played half a dozen musical instruments and jammed with American jazz greats including Benny Goodman.

By the twilight of his rule, Bhumibol had become the world’s richest monarch and one of the planet’s wealthiest people: Forbes magazine estimated his fortune at more than $30 billion in 2011. Although not known for having extravagant tastes, he nevertheless lived the elite life of a modern-day king, racing yachts and appearing at official functions clothed in ornate golden robes.

Over the last decade, the once vigorous Bhumibol had withdrawn from public life due to a series of illnesses. His wife, Queen Sirikit, has also long been ailing and has been even more rarely seen.

The king was often ensconced at a Bangkok hospital, emerging from time to time to gaze across the Chao Phraya River from a special pavilion. He had been notably silent about the political upheaval and protests that have shaken the country in recent years.

Since army-staged coups in 2006 and 2014, political rivals had increasingly invoked the need to protect the palace as a pretext to gain or hold power, and some politicians have been sidelined by opponents who accused them of disrespecting the king, a grave crime in this Southeast Asian country. Although Bhumibol once said he is not above criticism, Thailand’s lese majeste law – the world’s harshest – has been routinely employed in recent years, with anyone charged with defaming the palace facing 15 years in jail.

The king’s heir apparent is his son, Crown Prince Vajiralongkorn, who does not hold his father’s place in Thai hearts. There are other possible candidates for succession, and Bhumibol had the constitutional right to appoint a successor, but it was not immediately known whether he had done so.

With the king’s passing, the world’s longest reigning monarch is Queen Elizabeth II, who ascended to the British throne in 1952. Bhumibol Adulyadej (poo-me-pon ah-dun-yaa-det) was born Dec. 5, 1927, in Cambridge, Massachusetts, while his father, Prince Mahidol of Songkhla, was studying medicine at Harvard University.

Bhumibol ascended to the throne in 1946, when his brother, 20-year-old King Ananda Mahidol, was found dead of a gunshot wound to the head in a palace bedroom under circumstances that remain mysterious. Bhumibol, then an 18-year-old prince, was named king 12 hours later following an extraordinary legislative session.

After the shooting, Bhumibol returned to Switzerland, where he was studying law and political science. In 1948, he was seriously injured in a driving accident that deprived him of sight in his right eye; Sirikit Kitiyakara, the daughter of a Thai aristocrat and diplomat, helped nurse him back to health.

Bhumibol and Sirikit wed in 1950, a week before the king’s coronation ceremony. Together they helped bridge East and West, visiting nearly 30 countries early in their reign. Bhumibol addressed the U.S. Congress when Dwight D. Eisenhower was president, dined with French leader Charles de Gaulle and met Elvis Presley on a visit with his queen to a Paramount Studios movie set in 1960.

Thailand has been a constitutional monarchy since 1932, with the prime minister and Parliament holding political power, and the king serving as head of state and placed in “a position of revered worship.” Although disillusioned in recent years with mounting societal greed, environmental destruction and the sidelining of traditions, the king said he tried to move with the times.

“A constitutional monarch must change with the country but at the same time he must keep the spirit of the country,” he declared. People may be different, he said, “but the common character of the people must be embodied by the king.” For much of his reign, as Thailand hurtled from a traditional agrarian society of 18 million people to a modern, industrializing nation of 70 million, Bhumibol spearheaded thousands of projects aimed at improving life for his people, traveling to the farthest reaches of his nation to join village elders on a patch of grass to discuss the recent harvest or plot an irrigation ditch.

The weight of royalty and Bhumibol’s work on behalf of Thailand’s have-nots won him a following backed up by nightly TV programs that tracked his every move. He remained active until his final years and dispensed funds and advice on everything from deforestation to Bangkok’s traffic.

“They say that a kingdom is like a pyramid: the king on top and the people below,” he once told an Associated Press reporter. “But in this country it’s upside down. That’s why I sometimes have a pain around here.” He pointed to his neck and shoulders.

The name Bhumibol means “Strength of the Land,” and the bounty of Thailand’s soil and waters was the king’s passion. In 1952, he set out to breed a better freshwater fish, a staple of the Thai peasantry, in the ponds of his Chitralada Palace in Bangkok. It was the first of more than 4,300 palace-sponsored development projects now blanketing the country.

He pioneered work to help eradicate the opium grown by northern hill tribes. “It has become an instrument of destruction … The drugs subjugate the body, the money subjugates the soul,” he said, dipping into his own pocket to start a project to convince the tribes to abandon opium crops for others like tea and coffee.

While normally in the background of government theater, the king stepped to the forefront at crucial moments of Thai history. During a pro-democracy uprising in 1973, he ordered the gates of the Grand Palace to be opened to students fleeing the gunfire of troops loyal to a dictatorial triumvirate. The message was clear, and the trio went into exile. In 1992, during another bloody confrontation between the military and pro-democracy protesters, the king called in the two key protagonists, who prostrated themselves before him on nationwide TV and promised peace. The crisis ended immediately.

After mass protests against Prime Minister Thaksin Shinawatra began in 2006, Bhumibol urged the country’s top courts to resolve the political crisis. A bloodless military coup followed, and part of the army rationale for intervening was Thaksin’s alleged disrespect for the king.

Even with Thaksin dispatched, the crisis simmered, with his opponents – the so-called “Yellow Shirts” – claiming the mantle of defending the monarchy. With the country polarized, Queen Sirikit showed her sympathies by attending the funeral of a Yellow Shirt follower killed in protest clashes, undermining the axiom that the throne was above politics.

By 2011, the king’s health had worsened and Thaksin’s sister Yingluck Shinawatra had become prime minister through elections. Mass protests helped fuel an unstable climate that triggered another army coup in 2014.

Through it all, Bhumibol himself remained adored and revered. His occasional public outings drew tens of thousands of people into the streets trying to catch a glimpse, with most dressed in the royal color yellow. Many have wept at the sight of his passing motorcade.

Much of the admiration is genuine: framed posters, paintings and photographs of the king are ubiquitous in Thai homes and shops, depicting not only an exalted figure in glimmering robes, but also an ordinary-looking man with a camera strapped around his chest. Taxicab windows proclaim “Long Live the King.”

But some of the adulation is obligatory. Bhumibol’s birthday is a national holiday. Pedestrians must stop while the royal anthem is played at 8 a.m. and 6 p.m. daily in parks and the mass transit system. In cinemas, a brief film play depicting the impact of Bhumibol’s life runs before every movie, and the audience must stand as it is shown.

Although Vajiralongkorn is the heir apparent, the throne could still pass to one of his sons or to his more popular sister, Princess Maha Chakri Sirindhorn. Bhumibol also has two other daughters, Chulabhorn and Ubol Ratana. The Privy Council, which advises the king, would have to nominate a candidate, to be approved by the Cabinet and Parliament.

“The next king will not be as influential as King Bhumibol, and I would bet that there will be a lot of competition to gain power over him or her by the military and political factions who want to use the king for their own ends,” said Paul Handley, American author of “The King Never Smiles,” a biography of the king scorned by monarchists for its frank criticism.

It’s indicative of the king’s untouchability that the book was banned in Thailand, and a Thai-American man was arrested for allegedly posting translations of parts of the book on the internet. Some have speculated that it was not just poor health that led Bhumibol to increasingly retreat behind palace walls, but his own worries about the future. Some of his private conversations toward the end of his reign reflected a deep concern that Thailand had lost much of the core culture he had sought to embody all his life.