A co-founder of the court-disbanded Cambodia National Rescue Party (CNRP), Rainsy had vowed to re-enter Cambodia on Saturday - nearly four years after fleeing overseas to evade arrest in a case widely seen as politically motivated.
The Phnom Penh Municipal Court said in a statement that Kem Sokha could leave his house, but that he could not engage in political activity or leave the country.
"Under the new requirements, he can travel anywhere but can't leave Cambodia ..."
When asked whether Thursday's events, which included Sam Rainsy being prevented from boarding a Thai Airways flight to Bangkok as a result of what the CNRP chief said was Hun Sen's interference, and Thai Prime Minister Prayuth Chan-o-Cha announcing that he could not enter Cambodia from Thailand, Mu Sochua acknowledged that the CNRP might repatriate via a different country.
Shortly after Sam Rainsy's announcement, Cambodian authorities arrested dozens of activists and deployed troops at the border, while border checkpoints were temporarily closed on Saturday.
"It is a due process in Cambodia", he said. He took another flight Friday to an undisclosed destination.
Malaysians ejected a corruption-plagued government that had ruled the country for over six decades at the polls past year, and voted in a more reform-minded alliance.
"Keep up the hope.
We're on the right track", Mr Rainsy said in a message to supporters as he arrived at Kuala Lumpur International Airport.
Kem Sokha's daughter, Kem Monovithya, told Al Jazeera she considered the release "the first of many steps that need to happen in order to restore Cambodia's democracy". "Democracy will prevail in Cambodia".
Sam Rainsy fled to Paris in 2015 after a conviction for criminal defamation and faces a five-year sentence in a separate case - charges he says were politically motivated.
"Only in Hun Sen's repressive Cambodia would letting someone out of house arrest after two years on politically fabricated charges be considered "progress" of some sort". In preparation for any unrest, Cambodia's military has mobilized on its borders and near airports. Cambodia's government said he was not barred from entering, but warned it would take action against anyone threatening state security.
Their detention occurred ahead of a planned rally in Cambodia on Friday, in which Sochua and CNRP founder Sam Rainsy had been scheduled to attend.
Cambodia's exiled opposition leader Sam Rainsy, upon landing in Malaysia, says he's determined to return to his homeland despite strong attempts by Cambodian Prime Minister Hun Sen's government to thwart him.
Speaking to RFA, CNRP deputy president Eng Chhai Eang said that the statements from Sok Ey San and Cambodia's mission in Geneva suggested that the CPP has no intention of initiating dialogue with the opposition, as urged by the USA and United Nations, but he said that the CNRP will not abandon its goals. CNRP officials there said they had no immediate comment on the easing of restrictions on Kem Sokha.
Phil Robertson, deputy Asia director at Human Rights Watch, said Malaysia "deserves kudos" for permitting Sam Rainsy and meet with his colleagues.
Rainsy was speaking to reporters after landing in Kuala Lumpur on Saturday.
Arriving in Kuala Lumpur, he refused to disclose his plans but said, "I will go back home, it is my right, it is my duty".
"We follow the SOP and did not comply with what was requested by the Cambodian (government) because we make the decision whether to send people back, allow them in and others following our own calculations, " he said.
Mr Sokha is accused of plotting to overthrow Hun Sen, who has been in power for more than three decades.
"Kem Sokha's release from house detention is a last minute attempt to deflect European anger", said Phil Robertson of US -based Human Rights Watch.
The Trump administration, also on Friday, condemned the recent arrests and reminded Malaysia of its obligations under worldwide law barring the return of people to face torture.
Kem Sokha, 66, was arrested in 2017 and the Cambodia National Rescue Party (CNRP) was banned in the run-up to a general election a year ago that Hun Sen's ruling party then swept but which was condemned as a farce by Western countries.