China, a top ally and benefactor, has stuck by Cambodia's side

China will donate ballot boxes and voting booths for Cambodia's 2018 election, an official said Thursday, weeks after Western democracies pulled their support in protest over a crackdown on opposition politicians.

The US and the European Union withdrew their backing after a Phnom Penh court dissolved the main opposition party in November -- a move they said stripped next year's election of any legitimacy.

The ruling all but guarantees a victory for premier Hun Sen, an authoritarian leader who has been methodically sweeping out rivals as he looks to extend his 32-year run in office.

Western powers and rights groups have warned that the unprecedented crackdown could spell the death of democracy in the Southeast Asian nation.

But Beijing -- a top ally and benefactor -- has stuck by Cambodia's side, offering to provide an array of equipment for the July 2018 election.

"China pledged to give the equipment to serve the election in 2018," Dim Sovannarum, a spokesman for Cambodia's National Election Committee (NEC), told AFP.

He could not confirm the total cost of the donated gear, which includes computers, ballot boxes and voting booths.

The official -- who denied Beijing was filling the gap left by the EU and the US -- said the Chinese assistance would help "ensure transparency, accuracy and accountability" in the poll.

China is Cambodia's biggest source of foreign aid and regularly provides electoral support, including vehicles and other supplies worth $11 million for local polls held this year.

Beijing's total investment in the country topped $11.2 billion in 2016, according to official Cambodian data.

The flood of Chinese cash has significantly cut Hun Sen's reliance on Western donors, whose aid often comes with pressure to safeguard human rights and democratic institutions.

Analysts say Beijing's backing has emboldened the strongman's attack on political rivals, civil society and the press.

Source: AFP