Customers queue to buy facial masks to prevent an outbreak of a new coronavirus, in Hong Kong, China January 28, 2020.

British Airways has stopped all direct flights to and from mainland China because of the coronavirus outbreak.

The airline said the suspension would be implemented "with immediate effect" following the viral outbreak that has caused 132 deaths and infected more than 6,000 people.

Beijing authorities have continued efforts to contain the virus, while other countries have begun to evacuate their citizens from the region.

Almost all deaths from the flu-like virus have occurred in the city of Wuhan and the surrounding province of Hubei, which remains on virtual lockdown.

See: Coronavirus live updates

British Airways normally operates daily flights to Shanghai and Beijing from Heathrow, but on Wednesday morning these were canceled without any indication of when they would resume.

"We have suspended all flights to and from mainland China with immediate effect following advice from the Foreign Office against all but essential travel," British Airways said in a statement.

The airline apologized to travelers for the inconvenience but said "the safety of our customers and crew is always our priority."