No monarch in modern times has embodied the life and fate of his country so completely as Norodom Sihanouk, who has died aged 89. He was king, then prince, then king again of Cambodia, amending his royal role according to the needs of the hour and his own volatile will. He was also a film-maker, journalist, editor and impresario as well as a leading, and often dominant, politician for more than 60 years.

He began adult life as a young king chosen by the French as a puppet. But, aided by the upsets of the second world war, he outfoxed the colonial power and led his country to independence. The epic tale continued as the prince protector shielded his people from the worst of the Vietnam wars, then as he held on through the dark years of usurpation and Khmer Rouge rule.

Cambodia returned to something resembling normal life, with Sihanouk once again on the throne. But his country's rehabilitation was terribly flawed, and until his abdication in 2004 he found himself presiding over a poor, corrupt and divided nation, ruled by a bizarre duopoly of enemies. Over the years he sometimes succeeded in using his power and influence to avert the worst. But this domineering, mischievous and hyperactive man was undoubtedly the part-author of his own and his country's misfortunes.

Sihanouk managed to keep his country out of the conflict between the Americans and the Vietnamese for many years. But he must also bear some of the responsibility for the tragedies that then overtook Cambodia as it was drawn into the war, suffered from massive American bombing, and fell under Khmer Rouge rule.

How much responsibility is the great question raised by his life. Some would say that he dominated Cambodian politics because the political class was untalented, shortsighted and faction-ridden, and, as far as the left was concerned, too influenced by inexperienced and mediocre intellectuals. When Sihanouk was removed in the 1970 coup, these vices came into full play, at first in the incompetent, corrupt and unrealistic rightwing regime of Lon Nol and then, devastatingly, in the incompetent, ruthless and even more unrealistic leftwing regime of Pol Pot.

Others have argued that the failings of the political class, left and right, were in part Sihanouk's handiwork, since he undermined every development that might have led to multi-party politics. In abandoning his policy of balance, he forced many of those on the left, who would otherwise have continued in conventional politics, into the jungle, where they joined the Khmer Rouge. And although he joined forces with the Khmer Rouge after the coup, he proved wholly unable to influence them or to protect his people from them.

Sihanouk was a man of eccentric charm. Journalists who visited Cambodia in the difficult final years of his personal rule, when he was trying to manipulate both the US and North Vietnam, came to relish his extraordinary performances at press conferences. He would read out press clippings in his high voice and follow up with a stream of jokes and imprecations. He was a great talker, but his assumption of expertise was often false.

Born into the royal family in Phnom Penh, the Cambodian capital, Sihanouk received his early schooling at the main French lycée in the Vietnamese capital of Saigon. But he received no significant further formal training in political or military affairs, or in the artistic and scholarly pursuits in which he dabbled throughout his life, and for which he had some talent. Never subject to any discipline and never facing any serious criticism in his artistic endeavours, he remained, as some would say he did in politics, an egotistical if gifted amateur.

His early private life was flamboyant. During the 1940s and 50s he took at least six wives and consorts and fathered at least 14 children. The political management of such a large family, with its inevitable rivalries between different consorts and their sons, remained a problem for the rest of his life. Monique Izzi, daughter of an Italian father and a Cambodian mother, was his principal partner from the late 1950s.

The French – representing the Nazi-puppet Vichy regime – placed Sihanouk on the throne in 1941, setting aside more qualified candidates, including his own father. Sihanouk was 18, interested in football, jazz, riding, movies and girls. But an early sign that the French were mistaken about his pliability came after the Japanese ousted them in early 1945. Sihanouk followed the unavoidable, Japanese-managed proclamation of independence with laws reinstating the Khmer alphabet and calendar.

The French were soon back in charge and gave Cambodia a democratic constitution in 1947, reserving most power, however, for themselves. Sihanouk sometimes played the French game, as they had expected, but increasingly came to use French techniques of political manipulation on his own behalf rather than theirs.

He took the independence card from Cambodia's embryonic middle-class politicians, launching, in 1952, his own "royal crusade for independence". Aided by events in Vietnam, he effectively showed the French the door. In 1955 he abdicated in favour of his father. This shrewd move enabled him to avoid the constitutional problems of trying to be king and the country's leading politician at the same time. Yet as "monseigneur" – the head of state – he never lost his monarchical aura, and indeed continued to exploit it in full.

The great loss was that between 1947 and 1958 pluralist politics could have emerged in Cambodia around the middle-class Democratic party, but Sihanouk, with the French egging him on in the early years, seized every opportunity to undermine that party and eventually destroy it. Cambodia became a quasi-dictatorship and one-party state under Sihanouk and the Sangkum Reastr Niyum (Popular Socialist Community). Nor were his hands as clean as he liked to maintain. His regime killed, imprisoned and intimidated opponents – admittedly on a scale dwarfed by later excesses.

Sihanouk's peak years came between 1955 and 1962, when his touch was sure and his dominance nearly absolute. He picked the candidates for the national assembly in 1958 and 1962, and expertly managed the cabinets. By sudden changes of direction, he managed to throw his rivals and allies off balance. As soon as a cabinet was formed or an assembly had gathered, even though he had chosen them himself, he immediately undercut the strongest groups and individuals.

He had a sharp sense of the peasantry's needs and aspirations and continually played these off against the urban elite. On the radio, he endeared himself to rural folk with his jokes and rough language. He also gained popularity by a programme of school, road and factory building, though many of these ventures were ill-conceived.

In the 1960s Cambodia's international position deteriorated. Sihanouk resisted pressures from South Vietnam and Thailand, including at least one serious plot, which he characteristically used as the basis for a film, Storm Over Angkor. He tried to keep in with communist and western states and to play them off against each other.

But such tactics were less effective with outside powers than they were domestically. In 1963 he ended US military and economic aid. For the rest of that decade a gradual loss of his control was apparent. In Phnom Penh, a restive, rightwing elite was becoming impatient with his foreign manoeuvrings and resentful of his restrictions on their economic and political privileges. In the jungle, the North Vietnamese were more heavily ensconced, and a Khmer communist movement was growing up under their protection. Internationally, Sihanouk was never able to repair the rift with the US, despite efforts at the end of the decade. He grew visibly disheartened, turning for distraction to film-making and the entertainment of foreign guests. "It is almost as if he despaired of governing the country," David Chandler wrote in The Tragedy of Cambodian History (1991).

When the plot against him took shape in 1970, he was in France. He did not rush home, as he had done on other occasions when his position was threatened, but seemed to dawdle in Russia and China. The coup brought Cambodia into the Vietnam war, a conflict for which, in spite of the boasts of Lon Nol, the new leader, it was wholly unprepared. Sihanouk, encouraged by the Chinese, went into a united front with the Khmer communists.

He spent the five years of war that followed mainly in Beijing and the North Korean capital of Pyongyang, both governments providing him with lavish accommodation. He did make one trip to the Khmer Rouge zone of Cambodia with Monique, who wrote happily of the pleasant chalets prepared for them. But it was an alliance without warmth. After the Khmer Rouge took power in 1975, they discarded the united front, and Sihanouk was soon a prisoner in the royal palace. He could do nothing about the Khmer Rouge's terrible mismanagement of the country, with its hideous human consequences. Five of his children died during this period, and he was probably lucky to escape execution himself.

But after the Pol Pot regime provoked the Vietnamese into a full-scale invasion in 1979, Sihanouk again lined up behind the Khmer Rouge to oppose the occcupation and the Vietnamese-influenced communist regime of Heng Samrin. Apparently reckoning Vietnam to be a worse evil than the Khmer Rouge, he resisted occasional efforts by the Vietnamese to bring him over to their side. His decision helped to isolate the new regime, which, whatever its faults, had rescued Cambodia from a time of horror, and also contributed to the survival of the Khmer Rouge as a formidable force.

Many of Sihanouk's friends in the west found this course of action hard to accept. Had he made his peace with the new regime, he would have given it international respectability. That would have made it more difficult for the Khmer Rouge to win the foreign support they did. Western and Chinese policy was aimed at punishing Vietnam and cutting it down to size. The welfare of the Cambodian people was a lesser consideration for them, but ought not to have been for Sihanouk. However, the argument may overlook the deep-seated Cambodian fear of being absorbed by Vietnam, which Sihanouk certainly shared with his countrymen, including Lon Nol and Pol Pot.

With the disintegration of the Soviet Union, their ally and patron, the Vietnamese could no longer sustain their intervention in Cambodian affairs. They withdrew their troops in 1990, and in 1991 a Cambodia peace conference in Paris led to the installation of a temporary government consisting of the Cambodian People's party and the three opposition factions, with Sihanouk as head of state. UN forces were sent in to disarm the factions, UN officials to supervise elections, held in May 1993. They were won by the royalist party Funcinpec, which had been founded by Sihanouk in 1981 as a guerrilla movement, and the Cambodian People's party, now headed by Hun Sen and which had ruled in Pnomh Penh since the invasion in 1979. Funcinpec's success was undoubtedly due in large part to the still potent Sihanouk magic.

In June he was formally made head of state and in September restored as king. In spite of his age and ill health, he played politics with much of his old vigour, and often with no more sense of responsibility than before. Encouraged by Hun Sen, Sihanouk had suddenly proclaimed himself president, prime minister and commander-in-chief without consulting either the UN transitional authority or his son Ranariddh, leader of the royal party. The votes in the election were still being counted. It was an attempted coup that reminded those who knew him well of the high-handed tactics with which he had divided and ruled Cambodia in the past.

Sihanouk then played a leading part, along with the UN transitional authority, in persuading Ranariddh to form a joint government with Hun Sen. Ranariddh's party had won the election by a wide margin, and joint government represented a dismal conclusion to the democratisation effort. The country has never recovered from the consequences of this concession to Hun Sen's entrenched power. The two sides have not co-operated except in a wary sharing of the spoils of office and in making empty promises to the international donors whose aid keeps Cambodia going

Sihanouk had early on offered the Khmer Rouge cabinet posts in return for a ceasefire, amending this to advisory posts when it was pointed out that cabinet positions had to be filled by members of the assembly. He continued to pursue the idea of reconciliation with the Khmer Rouge, in spite of its record, perhaps on the principle that the more players are involved, the easier it is to manipulate them. Both Hun Sen and Ranariddh were soon vigorously pursuing reconciliation themselves: their competition for Khmer Rouge allies led to a coup by Hun Sen in 1997, of which Sihanouk initially seemed to approve.

His direct political influence, whether for good or ill, diminished as his health worsened, involving long absences from the country. But he displayed some of his old divide and surprise tactics when he insisted on abdicating in October 2004, forcing the government to form a royal throne council to approve his choice of Prince Norodom Sihamoni as his successor. In his remaining years, Sihanouk spent much time in China, where he died.

To Cambodians, Sihanouk represented continuity when so much in their country had been destroyed. They valued his warmth and his evident concern for his people, while recognising that he had made many mistakes. It was typical of Sihanouk that he started his own website, offering a running commentary on politics, by turn witty, acerbic or just dotty; and typical of Cambodians that the site attracted as many as 1,000 visits a day – a lot in a country of 13 million people with limited computer literacy.

Cambodia's extreme weakness – the mystery of how a power that once made all of south-east Asia tremble has fallen so low – has obsessed all its modern leaders and encouraged excessive and mystical solutions. Sihanouk, Lon Nol and Pol Pot all seemed to share the idea that there was some fount of strength and power to be found in the nation's traditions which, if tapped properly, would solve its problems.

Sihanouk saw it partly in his own person and in the monarchy: "I carry on my shoulders the overwhelming responsibilities of 16 centuries of royalty," he said in 1952. Lon Nol found it in the stars while Pol Pot and his associates believed that a total mobilisation of the population was the key. "If we can build Angkor, we can do anything," Pol Pot is supposed to have said – a sentiment all three men undoubtedly shared.

Sihanouk was a Cambodian patriot who lacked neither energy nor courage. He was also often a conniving, arbitrary ruler who can be accused of never allowing his country's politicians the time or the room to reach maturity. After the 1970 coup, Sihanouk was written off as a man who would never again play a significant role, but he remained an important figure. His return to the throne was a piece of theatre intended to reassure Cambodians that in his person, there was some kind of connection with a better past and therefore a bridge to a better future. His orchestration of the succession had the same end in mind. Whether such a continuity was really re-established remains to be seen.

• Norodom Sihanouk, monarch and statesman, born 31 October 1922; died 15 October 2012