France urged its citizens in China to be extra vigilant after a "violent" knife attack on a French national in Shanghai this week, the country's embassy said Friday.
The warning came after tensions flared in Paris in recent days with violent demonstrations over the killing of a Chinese national by French police.
A statement from the French embassy in China did not specify the severity of the injuries sustained by the man attacked in Shanghai on Wednesday, but said his attacker had been detained after a Chinese colleague intervened.
It said while the assault appeared to be an isolated incident, French nationals should "in the current context" take note of its advice on vigilance and security.
The message did not directly mention the incident in Paris, which has been heavily covered in the Chinese media.
Beijing on Tuesday called on France to protects its citizens after Sunday's shooting in Paris, which sparked a violent protest in the city's Asian community that led to 35 people being arrested.
Shanghai police said on Friday that a foreign national had received "a superficial neck wound" with a razor in Wednesday's attack.
A 27-year-old suspect from the city, thought to be suffering from mental health problems, had been apprehended, the police said on its Twitter-like Weibo account.
Authorities also released a picture of a young man of European appearance with a bandage on his neck talking to a police officer.
Attacks against foreigners are rare in China.
Shanghai has a population of around 24 million people, with around 12,000 French people officially registered at the consulate.