China's President Xi Jinping says the killers of nine Chinese goldmine workers in the Central African Republic (CAR) must be "severely" punished.
Two Chinese workers were also wounded when gunmen stormed a mining site near the central town of Bambari on Sunday.
The local mayor blamed a rebel group for the killings.
But the rebels said Russian mercenaries from the Wagner group were behind the attack.
Its fighters are widely reported to have been deployed to mineral-rich CAR to help government forces defeat the Coalition of Patriots for Change (CPC), an alliance of rebel groups.
In a statement, China's foreign ministry called on its nationals to "leave high-risk areas as quickly as possible".
"The entire Central African Republic, with the exception of its capital Bangui, is rated red in terms of security risks,"it added.
The statement quoted President Xi as saying that every effort should be made to save the lives of the wounded, and to ensure the perpetrators were arrested and "punished severely" under the law.
Bambari's mayor, Abel Matchipata, said the attack took place at a mining site that had opened less than a week ago.
"It was the CPC rebels who attacked the Chinese who had come to exploit the mine. They looted the Chinese machines and their homes," Mr Matchipata said.
Unnamed sources told French broadcaster RFI that police, security officers and Russian mercenaries from the Wagner group went to the scene of the attack, before the bodies were transferred to a hospital.
There is no independent confirmation of the report.
Several attacks have taken place on Chinese nationals in CAR. In the most recent case, three of them were abducted on 13 March near a village in the west of the country.