Authorities conducted raids in areas near mines where Chinese live, including at a hotel in Ghana’s central region of Ashanti over the weekend, and by Wednesday had detained 124, the Chinese Embassy in Accra said on its website.

Chinese diplomats were negotiating with Ghana over the detainees, who were being held at an immigration detention center in Accra, the capital, the embassy said.

The detentions pose a delicate diplomatic problem for China. On the international stage, it needs to show that Chinese interests and activities overseas are lawful and socially and environmentally responsible, while domestically it must be seen as capable of maintaining the security and rights of its citizens abroad.

China’s voracious demand for natural resources to fuel its rapidly-growing economy has helped expand its presence in resource-rich Africa. But the detentions in Ghana are a reminder of the challenges of venturing abroad.

The incident has grabbed headlines in Chinese media, with several newspapers and websites reporting that Chinese workers are hiding in the jungles from the Ghanaian military police and Ghanaian troops were instigating villagers to loot the Chinese residents. Beijing has tried to counter the reports with reassurances that officials are doing all they can to help the Chinese workers.

“We have cautioned all the Chinese people in Ghana to strictly abide by the related laws and regulations and never to be misled by the unauthorized information in Internet,” the Chinese Embassy in Ghana’s spokesman Yu Jie was quoted as saying in a report by the official Xinhua News Agency.

Chinese diplomats have urged Ghanaian officials “to earnestly prevent local residents from looting during the clampdown on illegal gold-mining,” said Foreign Ministry spokesman Hong Lei in Beijing on Thursday. He said diplomats were “demanding that the competent law-enforcing authorities should earnestly avoid hurting the safety and legal rights of the Chinese nationals.”

Xinhua also cited a Ghanaian immigration official as saying that some of the Chinese detainees were also found to have been overstaying.

Ghana is one of the continent’s largest gold exporters and authorities there have tried to crack down on illegal mining. Reports of Chinese workers being caught by Ghanaian authorities on suspicion of such activities have surfaced in recent years — in October last year, one Chinese national died during a raid on illegal gold mines in the Ashanti region.

The embassy says Ghana has said it would temporarily suspend its crackdown on illegal mining and allow Chinese workers to return home if they wish.