Hun Sen has repeatedly warned of civil war if his Cambodian People's Party loses the majority in city and village councils to the main opposition party, which had made major gains in the general election four years ago, when it claimed it was cheated out of outright victory.

Sunday's polls could have a major impact on Cambodia's political landscape ahead of the 2018 general election.

Opposition party spokesman Yim Sovann said his Cambodia National Rescue Party won about 500 communes out of the country's 1,646.

He said his party received 46 percent of the vote, up from 30 percent in the last local elections in 2012, while the ruling party got 51 percent, down from 62 percent in 2012.

"This is a huge victory for the Cambodia National Rescue Party," Yim Sovann said at a news conference.

Official results will be announced June 25.

The spokesman for the ruling party could not be reached for comment.

Hun Sen's government has been accused of using violence against opponents, but in recent years has stalked its foes mostly in courts.

On Friday, Hun Sen appealed to political parties to accept the election outcome rather than make accusations of irregularities, saying courts can dissolve any party if it challenges the result of the vote.

Hun Sen and some of his top ministers have frequently used strong rhetoric leading up to the vote, warning of dire consequences should the opposition win, in what has been seen as an attempt to intimidate voters into supporting him.

Cambodia's ruling party could take some credit for bringing modest economic growth and stability to a country devastated by the communist Khmer Rouge's regime in the 1970s. Hun Sen left the Khmer Rouge, which was responsible for the deaths of some 1.7 million people from starvation, disease and executions, before it was toppled in 1979.

This past week, Amnesty International accused Cambodia's government of using its grip on the judiciary system to intimidate human rights defenders and political activists. It said in a report that since the 2013 general election, Hun Sen's government has used the courts as a tool to imprison at least 27 prominent opposition officials, human rights defenders and land activists, as well as hundreds of others facing legal cases.

Earlier this month, the State Department said the U.S. was urging Cambodia's government to "guarantee a political space free from threats or intimidation" and respect freedom of expression for all its citizens.