Cambodia's opposition leader has been charged with treason and could face a jail term of up to 30 years if convicted, according to a statement by a municipal court in Phnom Penh.

Kem Sokha was charged with "colluding with foreigners" under Article 443 of Cambodia's penal code, the court said on Tuesday.

"Kem Sokha, head of Cambodia National Rescue Party, was arrested by police for committing [a] red handed crime related to a secret plan and the activities of conspiracy between Kem Sokha and foreigners which causes chaos and affects the Kingdom of Cambodia," the statement read.

#KemSokha 's message from prison: I may lose freedom, but may freedom never die in Cambodia. — Kem Sokha (@kemsokhacnrp) September 4, 2017

"The secret plan has been implemented since 1993 and until 2013," the court said, charging the politician under the penal code section for "treason and espionage".

The charge followed the middle-of-the-night arrest of Kem Sokha on Sunday, which observers say was meant to solidify the position of Hun Sen, the longest serving ruler in the region, in the run-up to next year's parliamentary elections.

Hun Sen's government accused Sokha of plotting with the United States.

Fresh News, a pro-government website, earlier said it had video of Kem Sokha discussing overthrowing Hun Sen with support from the US.

It showed a picture of him being led away in handcuffs on Sunday.

The European Union has called for his immediate release, based on the fact that he is meant to have parliamentary immunity as an elected legislator.

The US state department expressed "grave concern" at his arrest on charges it said appeared to be politically motivated.

Zeid Raad al-Hussein, the UN high commissioner for human rights, said on Monday he was seriously concerned about the arrest and the evidence against Kem Sokha.