A French national was “violently” assaulted by a knife-wielding attacker in Shanghai, France's consulate has said. The attack comes days after a Chinese man was shot dead by police in Paris, sparking riots among France’s Chinese community.

Following the stabbing, the Consulate General of France in Shanghai issued a warning on Friday, urging nationals in the city to be vigilant.

“The French Embassy in China calls the French community to the utmost vigilance.

The embassy and consulates-general are in constant contact with the Chinese authorities to remind that the security of French nationals in China is a priority,” the Consulate statement reads.

The incident took place on Wednesday, March 29. According to the consulate, a Chinese man attacked and tried to stab a French national at Yongjialu Street, in the district of the former French concession, at lunchtime. After the man’s Chinese colleague intervened, the assailant fled, but was later apprehended by police.

Xinhua News Agency posted pictures of the attacker and the wounded French national obtained from Shanghai Municipal Public Security Bureau online.

The assailant is currently in custody, Xinhua News Agency reports. He was identified as 27-year-old Shanghai man surnamed Mao.

Citing police, Xinhua reported that the suspect suffers from a mental illness. The French national who had become victim in the incident is said to have been treated for a minor cut on his neck.

An investigation has been opened to determine the circumstances of the attack.

READ MORE: ‘They come and kill us’ – France’s Chinese community decries police brutality & racism

It is so far unclear if the incident is linked to the death of a Chinese man killed in Paris on Sunday during a police operation at his home. Police were called to 56-year-old Shaoyo Liu’s home in Paris following a family argument and eventually ended up killing the father of five in front of his family: officers said he had attacked them with a pair of scissors. The victim’s family rejected this explanation, however, saying he was using the scissors to cut fish he was cooking.

The death has provoked a wave of protests by the Chinese community in the French capital and led Beijing to demand a thorough investigation on the safety of its nationals from the French authorities.