Air China says it has removed all copies of an in-flight magazine that's been slammed for "blatant racism" about ethnic minorities in London.

A travel tip at the end of the magazine's latest cover story advised London visitors about going to neighborhoods with large populations of "Indians, Pakistanis and black people." The warning set off a storm of protest and prompted a British lawmaker to demand an apology from China's flag carrier.

"London is generally a safe place to travel, however precautions are needed when entering areas mainly populated by Indians, Pakistanis and black people," said the passage, which was spotted by a CNBC journalist. "We advise tourists not to go out alone at night, and females always to be accompanied by another person when traveling."

The warning appeared in the September issue of the airline's "Wings of China" magazine as part of a promotional feature about the British capital.

"I am shocked and appalled that even today some people would see it as acceptable to write such blatantly untrue and racist statements," said Virendra Sharma, the member of parliament for an ethnically diverse district in western London. He said Wednesday he had written to the Chinese ambassador to the U.K. to demand an apology from the state-owned airline.

On Thursday, Air China (AIRYY) pinned the blame for the "inappropriate expressions" on a sister firm, Air China Media, which shares a parent company with the airline and publishes its in-flight magazine. The airline said it had "asked the publisher to draw a serious lesson from the episode and strengthen its content review to avoid similar problems from arising again."

I have written to the Chinese Ambassador about the balant racism of Air China https://t.co/hRNsiBjB0F — Virendra Sharma MP (@VirendraSharma) September 7, 2016

Air China Media said in a letter addressed to the airline that the upsetting language was "entirely due to an editing error and in no way reflected the magazine's views."

"This has caused great negative impact on the operations and brand image of your airline, for which we sincerely apologize," Air China Media said, adding that it also hoped to "sincerely apologize to all travelers and readers who were offended by the article."

Air China Media also claimed it had published the story "in cooperation with the tourism board for Great Britain." But VisitBritain, the country's official tourist board, said it had not been consulted and did not have "sight of the text of this article at any stage."

An earlier apology was posted on Air China's North American Twitter account Wednesday afternoon in the U.S. But the tweet was deleted hours later without explanation.

The Chinese Ministry of Foreign Affairs said Thursday that it hoped Air China would "properly handle the situation after its investigation."

Related: Ex-airline manager accused of smuggling for Chinese military

"I want to emphasize the position of the Chinese government," ministry spokeswoman Hua Chunying said at a regular press briefing. "We always hold that all races are equal and firmly oppose all forms of racial discrimination."

The controversy is the latest case of marketing linked to China coming under fire for racism.

A Chinese company provoked widespread outrage earlier this year with a laundry detergent ad that depicted a black man being thrown into a washing machine and then emerging as a light-skinned Chinese man.

There was also considerable criticism online after the Chinese posters for "Star Wars: The Force Awakens" seemed to downplay black actor and co-lead John Boyega.

-- Nanlin Fang contributed reporting.