Cambodia has released a prominent opposition figure from house arrest more than two years after being charged with high treason after his colleagues' attempts to return to the country were thwarted.

Kem Sokha was arrested in 2017 and charged with planning the overthrow of the strongman Hun Sen, who has been ruling since 1985. He was taken to a remote prison, subsequently locked in his home and in the surrounding block, and was forbidden to speak to the media.

But he can now travel nationwide, said Y Rin, a spokesman for the Phnom Penh district court, to AFP on Sunday.

Kem Sokha is co-founder of the banned Cambodia National Rescue Party (CNRP), which was dissolved before the election swept by Hun Sen last year.

The new court ruling, which raised health concerns, prohibits the 66-year-old from leaving Cambodia or joining political activities.

Pheng Heng, a lawyer from Kem Sokha, confirmed that some restrictions were lifted, but said the policy ban was too broad and unclear.

Right-wing groups say that Cambodia's legal system is controlled by the Hun Sen government.

The decision comes when Kem Sokha's political partner, Sam Rainsy, takes to the streets in Malaysia with other CNRP officials after attempting a well-received comeback on November 9, Independence Day in Cambodia.

Rainsy, who has been living in France since 2015 to avoid convictions for political reasons, had promised a dramatic return.

After Rainsy had been excluded on Thursday in Paris from a flight to Thailand, he got on a plane a day later and landed in Kuala Lumpur.

It is unclear how he will come back to the country and he plans to meet Malaysian MPs this week. He did not immediately respond to a request for comment on Kem Sokha.

Dozens of activists have been rounded up in Cambodia in recent weeks, and Hun Sen has called on members of the Association of Southeast Asian Nations (ASEAN) to arrest Rainsy for attempting a coup.

However, Hun Sen is also under international pressure to ease restrictions on dissent as the European Union is considering abolishing a tariff-free tariff system for the lucrative Cambodian garment sector.

The member of the ASEAN Parliament for Human Rights and the former Filipino MP Teddy Baguilat called the court decision misleading and tried to fend off sanctions.

"This is just another cynical attempt by Hun Sen to deceive the international community," he said.

Human Rights Watch spokesman Phil Robertson said the move was "too little, too late". In a statement to the Guardian, he said, "The release of Kem Sokha from custody is a last-minute attempt to divert European anger over the bad ways in which Prime Minister Hun Sen and Cambodia have dealt with human rights concerns."

"Only in Hun Sen's repressive Cambodia would the release of people from house arrest, after having been detained for two years for alleged political allegations, be considered progress." It is acceptable to fully relieve Kem Sokha and fully restore his civil and political rights. "