Image copyright Sygma/Getty/AFP Image caption Hun Sen, seen in the late 1980s (L) and this year (R), has been in power for more than three decades

Cambodia's Hun Sen has been in power since 1985 and is one of the world's longest-serving prime ministers.

He is credited with helping achieve economic growth and peace after the devastation caused by the Khmer Rouge regime, responsible for one of the worst mass killings of the 20th century.

But the prime minister, 65, is also seen as an authoritarian figure with a poor human rights record and the resources and will to thwart any real political challenge.

He shows no signs of wanting to relinquish power - in June 2018, he vowed to rule for 10 more years.

His ruling Cambodian People's Party (CPP) has dominated Cambodia for decades, but has faced competitive elections.

However the party goes into the July 2018 elections facing no significant rivals after the main opposition - the Cambodia National Rescue Party - was dissolved.

Political deals

Born into a peasant family in 1952, Hun Sen was educated by Buddhist monks in Phnom Penh.

In the late 1960s, he joined the Communist Party. He lost his left eye during an exchange of gunfire and he has reportedly said he can only see a limited distance.

During Pol Pot's tyrannical regime in the late 1970s, under which as many as two million people died, Hun Sen commanded troops in the Khmer Rouge - although he denies accusations of complicity in the regime's crimes.

In 1977 he fled to Vietnam to join troops opposed to the Khmer Rouge.

When Vietnam installed a new government in Cambodia in 1979, he returned as minister of foreign affairs, becoming prime minister in 1985 at the age of 33.

Hun Sen lost the 1993 elections, but he refused to accept the results and forced a negotiation to become second prime minister alongside the Funcinpec Party's Prince Norodom Ranariddh.

He went on to seize power in a bloody coup in 1997, forcing Prince Ranariddh to temporarily leave the country.

The CPP won general elections in 2003 but did not have a two-thirds majority, so it struck a deal with Funcinpec in 2004, ending almost a year of political deadlock. Hun Sen was re-elected prime minister by parliament in July 2004.

Warnings of war

In Cambodia's 2008 elections the CPP won most of the contested seats. But the polls were criticised by international monitors, with the EU saying the ruling party made "consistent and widespread" use of state resources for its own campaign.

Hun Sen takes credit for Cambodia's rapid economic growth and a booming garment sector that manufactures clothes for global brands.

He also regularly warns Cambodians that if he were to be ousted from power, the country would return to a state of war.

He focused on this theme in the lead-up to the 2013 election, after two major opposition parties joined forces, presenting a united threat to the CPP.

The party they formed, the Cambodia National Rescue Party, was led by Sam Rainsy, a former Funcinpec minister who has long been Hun Sen's chief rival.

Image copyright AFP Image caption Hun Sen and an orangutan at an event in June

Ahead of the vote, Hun Sen faced calls from the US to allow Mr Rainsy to return from exile. He had been living in France after being jailed in absentia in 2010 on charges he said were politically motivated.

Eventually Hun Sen relented. Mr Rainsy was granted a royal pardon and arrived in Phnom Penh to a hero's welcome from thousands of cheering supporters who lined the streets.

A major challenge

The CNRP picked up momentum and won 55 National Assembly seats to the CPP's 68 in the 2013 election - the worst result for the CPP in many years.

Mr Rainsy and the CNRP - supported by reports of widespread irregularities from local and international election monitors - cried foul and rejected the results.

They led a protest movement for nearly a year, including mass street rallies and a large sit-in at a park in Phnom Penh.

It was the most significant challenge to Hun Sen's rule in more than a decade, and eventually he ordered the security forces to end the protests.

Image copyright AFP Image caption The opposition CNRP party led mass protests after the 2013 election

He and Mr Rainsy reached a deal to work together under a "culture of dialogue" but this eventually broke down, with opposition party members and activists jailed. Sam Rainsy again fled abroad after a historic prison sentence was resurrected.

In 2016, a government crackdown against perceived dissidents escalated, ahead of local elections in 2017.

In July, a prominent political analyst and government critic, Kem Ley, was assassinated in broad daylight, supposedly over a debt dispute.

Removing opposition

After the opposition performed well in the 2017 commune council elections, Hun Sen and the CPP moved definitively against the CNRP. In September, Kem Sokha, the new leader, was arrested on treason charges and several other senior politicians fled into exile.

Two months later, the Supreme Court dissolved the CNRP completely, paving the way for national elections in 2018 that have been rejected as illegitimate by the EU and US government.

Hun Sen is facing calls for sanctions against his inner circle, but appears to be pushing ahead to consolidate control.

Analysts say he is grooming his three sons - all of whom are in powerful positions either in the party, military or government - to take the reins when he eventually steps down.

But no one knows when that might be.