A former foreign worker at the Chinese Academy of Sciences (CAS) will be forced to leave China after sparking internet outrage with some racist online posts.

Mark A. Kolars, formerly an Austrian-born visual effects specialist at the CAS Institute of Automation, got into a verbal tussle on LinkedIn earlier this week, saying things like:

“Not racism, just don’t like dirty yellow guys talking trash all day long, who cares about your leaders we are here to make money and you need us. Without us to begin with you would still wear rice heads.”

And:

“Oh no, quite the opposite, the bench mark for men from Chinese women is much higher and prefer real men like us, we treat them better, pleasure them better, smoke and drink less, in general take more care about our physical attributes, have in general high education and do not oppress them.”

Also:

“You are referring to my son as being a ‘mongrel,’ yes he is a mix, very smart and good looking. And no he is not a ‘breed of unknown races’ he is a mix of European Caucasian and Asien (sic) Chinese blood. Europe and bench mark which China will never reach. Not smart enough. Inbreeding for too long. Nature strives for genetic variances.”

Shortly after these messages were shared on Weibo on Tuesday, the CAS announced that Kolars had been suspended from his post. Two days later, the research institute said that he had been sacked.

The Exit and Entry Administration of the Beijing Public Security Bureau followed up on Friday, explaining that Kolars had his residence permit revoked and would have to leave the country before his visa expires.

The administration said that people from across the world are welcome in China, but they must obey Chinese laws and respect Chinese culture and history.

After first giving advice on how to respond to Chinese internet trolls, Kolars had issued an apology on Tuesday night on his LinkedIn page, writing:

Facing life pressure and setbacks I posted several messages on LinkedIn which were inappropriate and racist in nature and hurt the feelings of my Chinese friends and colleagues and caused a very bad impact in the society. I am very sorry. I am very sorry to my family and friends, and I am willing to take all responsiblities for everything that happened.

His account has since been deleted.