BANGKOK — The body language was as stiff as the gilded robes and bemedaled uniforms he wore. The face rarely betrayed even a flicker of emotion. He was the king, wrote one biographer, who never smiled.

And indeed when appearing before the public or during the thousands of state and religious ceremonies over which he presided, King Bhumibol Adulyadej assumed the role of “dhammaraja,” the impassive, righteous Buddhist monarch, an heir to 800 unbroken years of royal rule, the dominant figure in Thailand’s modern history.

But my own most vivid recollections of the world’s longest reigning monarch, who died Thursday at the age of 88, are rather different.

The last time I met the king, in 2008, he was dressed in a Western suit, relaxing on a sofa — and smiling. Behind closed doors of Bangkok’s Chitralada Palace, Bhumibol was seemingly enjoying the repartee with a small group of foreign journalists.

Far from the often stilted, vague language of his public speeches, he punctuated his remarks with colorful anecdotes and jokes in excellent English, talking for more than two hours about jazz, his family and beloved pet dogs, growing old and the downsides of golf courses and dams. Over the years, some of the king’s advisers noted that he seemed more at ease with foreigners because there did not exist the barriers of protocol as with most Thai subjects.

That evening was one of several times I glimpsed some of the contrasting sides of a complex personality, one that may never be fully plumbed given the almost godlike aura with which he was invested and a strict law forbidding criticism of the monarch and royal family.

There was the king’s rigid adherence to tradition and his modern informality, the severe demeanor and ready humor, his simple lifestyle and his reported status as the world’s richest royal with a net worth of $30 billion. And he fused a Thai Buddhist self with a Western persona, perhaps natural since Bhumibol was born in Massachusetts and spent his formative years in Switzerland with his much-loved mother, a commoner who may have imparted some of her down-to-earth ways.

“My mother praised me when I did something good and then the next moment she would say, ‘Don’t float.’ She put me in a balloon and then pricked it,” he told me in a 1982 interview, one of the very few he gave.

At the 2008 gathering and earlier, a palpable sadness also suffused his critical comments about the course Thailand had taken as it shed traditional moral values in favor of a me-first, greed-is-good society, criticism he had only obliquely expressed in public.

It was a very different time, and he was in some respects a different man, when I first came in contact with the king in the late 1970s, accompanying him on trips to the northern mountains, the rice paddies of the northeast and the Muslim communities of the deep south.

Then, some 80 percent of the population still lived in the countryside and Thailand had yet to become an economic dynamo linked to global trends and a magnet for foreign tourists by the millions. The 1970s were perhaps the last decade of the old Thailand, with its charming customs and picturesque villages along with widespread poverty.

This was also the heyday of Bhumibol’s reign as he set about initiating and personally monitoring projects in health, education, poverty alleviation, water management and eradication of opium.

“They say that a kingdom is like a pyramid: the king on top and the people below. But in this country it’s upside down,” the king said in the interview, his facing breaking into a broad smile as he pointed to his shoulder. “That’s why I sometimes have a pain around here.”

In his 40s, the king was at his prime, jogging 3 kilometers a day followed by push-ups, and I shed a few pounds trailing him up steep hillsides along with paunchy bureaucrats and panting courtiers.

During one of several grueling, consecutive days, the king, queen and eldest daughter arrived in the morning by helicopter at an agriculture experimental station in the northern province of Chiang Mai, the king having gone to bed at 2 a.m. the night before to prepare for the day’s work. Dressed in a gray sports jacket and camouflaged combat boots, he carried a 1:50,000-scale map, 35mm camera and walkie-talkie.

The day proved another whirlwind of treks on foot and by jeep with tribal people cataloguing their woes, officials briefing and the king asking for results through both stern demands and gentle cajoling. At 8:30 p.m. the royals returned to Bhuping palace, high above Chiang Mai city, where the queen hurriedly changed from her jogging shoes and pants to meet some 100 guests.

The atmosphere was mellow and enchanting, the French menu superb. But from the royal table came snatches of conversation: dams and weirs … soil content … fertilizer. “I think the queen may have told you: We don’t have a private life,” the king later said.

While much of the regal formality was dropped on upcountry trips, in Bangkok’s palaces and reception halls, officials, courtiers and favor-seekers would prostrate themselves, crawling forward on their hands and knees before speaking to him using an archaic royal vocabulary.

A month after the station visit, the king was back in the hills, this time meeting with five Lahu who had come to seek his help in reclaiming land another tribe had taken from them. One was picking his teeth with a sprig of straw, another chewed noisily on betel nut. Rivulets of sweat mingled with the reddish upland dust on the king’s face as he spread a map on the ground and dropped to his knees to study the problem, the Lahu casually ranged around him.

The king clearly savored such encounters, bantering with rural dwellers and trying to solve their problems, even marital ones. He once told me the story of a hilltribesman whose wife ran away after he had purchased her with two pigs. The king decided the husband deserved compensation which would allow her freedom. “The only trouble was I gave the money,” he joked. “So the woman belonged to me.”

The king’s time in the countryside probably did much to shape his idealized vision of Thailand, one more rooted in a self-sufficient agricultural society than urban aspirations and values that were taking hold.

In the late 1980s, during another meeting with a few foreign journalists, the king said rapid growth had outpaced social and spiritual development, leading to both moral and environmental depredations. The poor and the powerless in the way of the barreling economic engine, he said, stood to lose their traditional livelihoods, their land and their laudable qualities.

“Thailand was built on compassion,” he said in an undertone of melancholy. He spoke of now-vanished huts in the forests — “when there were still forests” — where travelers could have free lodging and food left behind by others.

In my 1982 interview, for National Geographic magazine, Bhumibol indicated that in modern times royal success would depend a great deal on the person who sits on the throne rather than the throne itself. And that his success as a monarch came from his own merit rather than mere inheritance.

To drive home the point the king said, “The father of one of our ladies-in-waiting, Prince Sri Visar, was very good at reading palms. He used to take mine in his hand, look at it, and say: ‘Your Majesty, the lines show that you are a self-made man.'”

The king said the throne had sunk to vulnerable depths following the abolition of absolute monarchy in 1932.

“When I was young we had nothing,” the king recalled, his normally composed voice taking on a quiver of emotion. “The carpets and upholstery in the palace were full of holes. The floors creaked. Everything was so old. Yes, we had a piano, an upright given to us by the Fine Arts Department. But it was out of tune.”

“There was none of this,” he said, motioning toward finely brocaded upholstery, plush silks and a mantelpiece crowded with photographs of world leaders the king had known. A few feet away from where we sat stood a magnificent, immaculately polished grand piano. Aides assured us that it was in perfect tune.

Denis Gray has been covering Thailand and neighboring countries for the AP for more than 40 years.