Psst! We are giving away movie passes here!

A foreign worker at the Chinese Academy of Sciences in Beijing has been fired for posting racist comments on social media.

The incident came to light when screenshots of posts made on employment networking site LinkedIn by Mark Kolars, a visual effects designer who worked at the academy's Institute of Automation in Beijing, were shared on Weibo, China's Twitter-like service.

One of them read: "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".

In another, Kolars referred to his son as "a mix of European Caucasian and Asien [sic] Chinese blood. Europe as bench mark which China will never reach. Not smart enough. Inbreeding for too long. Nature strives for genetic variances."

After angry internet users shared the messages online, the academy said on Tuesday afternoon it had been told about the matter and was investigating. A second statement issued at about 5pm said that Kolars had been suspended.

"The institute expresses extreme shock and indignation at the wrong attitude of the foreign employee and hereby condemns it severely," it said.

"The institute believes abiding by Chinese laws and regulations, and respect for Chinese culture to be a precondition for employment."

It said it was considering further action and would issue an update in due course.

On Thursday, the institute issued another statement on Weibo stating that his employment contract had been terminated.

Kolars issued an apology in LinkedIn on Tuesday night, saying he had posted several messages that were "inappropriate and racist in nature and hurt the feelings of my Chinese friends and colleagues".

"I am very sorry. I am very sorry to my family and friends, and I am willing to take all responsibilities for everything that happened."

Kolars' profile page on LinkedIn was unavailable on Wednesday.

This article was first published in South China Morning Post.