A Chinese detergent maker has blamed foreign media for whipping up controversy over an ad in which a black man "washed" by its product was transformed into an Asian man.

Shanghai Leishang Cosmetics apologised and said it strongly condemned racial discrimination but it pointed the finger at news reports for overblowing the ad, which first appeared on Chinese social media in March.

The company pulled it, though, after the clip went viral this week and drew both outrage and scores of media reports outside the country.

"We express regret that the ad should have caused a controversy," the statement issued late on Saturday said. "But we will not shun responsibility for controversial content."

"We express our apology for the harm caused to the African people because of the spread of the ad and the over-amplification by the media," the company said.

"We sincerely hope the public and the media will not over-read it."

This racist laundry detergent ad from China will leave you speechless.https://t.co/Y4W5W5Wwoq — AJ (@ajplus) May 27, 2016

The ad for Qiaobi laundry detergent drops shows a black man entering a room and attempting to flirt with an Asian woman. He is carrying a tin of paint, wears soiled clothes and has paint on his face.

She then feeds him a detergent drop and stuffs his body into a top-loading washer. When the cycle completes, a fair-skinned Asian man in a clean white T-shirt emerges to the delight of the woman.

When speaking to the Chinese nationalist newspaper The Global Times, a company representative named as Mr Wang, said the critics were "too sensitive", and the issue of racial discrimination never came up during the production of the video.

The ad's content rekindled discussions about discrimination in China, where many say prejudices against blacks are likely to be dismissed.