Cambodian opposition leader Kem Sokha received a royal pardon on Friday, freeing him from serving a five-month jail sentence and setting the stage for an easing of a year of political tensions as the authoritarian Southeast Asian country heads into election in 2017 and 2018.

The pardon for Kem Sokha, acting leader of the Cambodia National Rescue Party (CNRP), was granted by King Norodom Sihamoni following a request from Prime Minister Hun Sen, government and CNRP officials said.

Kem Sokha had been hiding out in the party’s headquarters in Phnom Penh since police attempted to arrest him in May for ignoring court orders to appear as a witness in a pair of defamation cases related to his alleged affair with a hairdresser.

After a one-hour trial on Sept. 9, Phnom Penh Municipal Court Judge Keo Mony sentenced Kem Sokha to five months in prison and an 800,000- riel (U.S. $200) fine for failing to appear in one of the related cases.

On Thursday, Kem Sokha wrote a letter to Hun Sen asking him to request a royal pardon. On Friday, Hun Sen wrote a letter to Sihamoni, who pardoned Kem Sokha later that day.

“The pardon was granted to Kem Sokha who wrote the letter to Samdech [honorific] Prime Minister Hun Sen and admitted the truth,” said ruling Cambodian People's Party (CPP) spokesman Sok Eysan.

Sok Eysan did not elaborate on what Kem Sokha had admitted.

Kem Sokha had always maintained that his legal problems were politically motivated, and most independent analysts had agreed with him, viewing the cases against them as part of CPP efforts to hobble the opposition before local elections in 2017 and a parliament poll in 2018.

“It was unconditional. It was a political solution between Khmer and Khmer,” he said.

Yem Ponhearith added that the party has received calls from families of other jailed CNRP activists and a National Election Committee (NEC) official asking Kem Sokha to seek royal pardons.

“We continue to work hard on this. We are optimistic that there will a political solution for their release also,” he said.

Kem Sokha wrote a thank-you letter to Hun Sen for working to get the royal pardon.

“Prime Minister Hun Sen’s decision is appropriate. It shows Cambodia and the world that we Khmer politicians are very forgiving and considerate. It shows that we are civilized people and strong believers in Buddhism,” read the letter, seen by RFA’s Khmer Service.

He also wrote a letter to thank King Sihamoni.

Reported by Sothearin Yeang for RFA’s Khmer Service. Translated by Nareth Muong. Written in English by Paul Eckert.