The union representing pilots at American Airlines filed a lawsuit Thursday to halt all flights to China, saying that continuing to serve the region during the coronavirus outbreak poses a threat to crew members and the public.

“Recent events relating to the outbreak of the novel coronavirus in China have created a threat to the safety of passengers and flight crew traveling to and from that country,” said the lawsuit filed in Texas on behalf of the Allied Pilots Association, which represents the 15,000 pilots at American.

The union’s action came as the World Health Organization announced it was declaring a “public health emergency,” setting in motion a plan for global coordination to stem the spread of the virus, which was first diagnosed in December in Wuhan, China. It also came after U.S. health officials more than tripled the number of airports that will screen incoming passengers for the virus, to 20.

“All pilots are obligated to make safety our number one priority,” union spokesman Dennis Tajer said. “There is enough uncertainty on this that it is a prudent decision to maintain a margin of safety.”

The suit noted that several carriers, including British Airways, Air Canada and the Lufthansa group, announced this week they were halting flights to the region.

In a separate message to pilots, union president Eric Ferguson said pilots should decline any assignment that would take them to China.

“Consistent with our lawsuit, I am directing all APA pilots to cease flight operations between the United States and China,” Ferguson said. “Until further notice, if you are scheduled, assigned, or reassigned a pairing into China, decline the assignment.”

“We are aware of the filing,” American Airlines said in a statement. “We are in close contact with the Centers for Disease Control and Prevention (CDC) and global public health officials to make sure we are taking all necessary precautions for our customers and team members.”

American announced this week it was suspending flights from Los Angeles International Airport to Beijing and Shanghai between Feb. 9 and March 27. The airline said there were no plans to cancel additional flights.

“We will continue to monitor the situation and make any updates as needed,” the airline said.

However, the suit contends continuing to offer service between Dallas-Fort Worth and several cities in China “is not only an unacceptable risk for flight crew members, but for the general public in North Texas due to the uncertainties relating to the disease, its incubation period and how the virus is spread.”

American operates 56 flights a month between Dallas and China, according to the lawsuit. As many as 300 passengers and crew members may be on each flight, the suit noted.

According to the lawsuit, crew members working a flight to China are required by federal regulations to be on the ground for roughly 32 hours between flights, a rule that “creates potential exposure for flight crew members to the coronavirus.”

Chinese officials said Thursday that the death toll in the country had reached 213, with more than 8,100 confirmed cases of infection — an increase of more than 1,000 from the previous day. (The figures from Beijing include nine cases in the self-governing island of Taiwan.) U.S. health officials also confirmed a sixth person has been diagnosed with the virus in the United States, in Chicago. The man’s wife was earlier diagnosed with the virus after returning from a trip to Wuhan.

The pilots union is in negotiations with the airline on a new contract, and the two sides have been unable to reach an agreement after a year of talks. On Wednesday, pilots held a demonstration at Dallas-Fort Worth International Airport to express their frustration.

But Tajer said the union’s frustration with negotiations is separate from concerns about the coronavirus.

“This has nothing to do with that,” he said. “Safety is a separate issue.”

The Association of Professional Flight Attendants, which represents those who work for American, voiced support for the pilots’ actions.

“The Association of Professional Flight Attendants (APFA) is in full support of our Brothers and Sisters at the Allied Pilots Association (APA) in their lawsuit to protect our crew members and the flying public,” Lori Bassani, APFA’s national president, said in a statement. “With the recent World Health Organization declaration of a global health emergency, the coronavirus and the situation in China should be taken with the utmost seriousness. … Until we know more and can be sure that all crew and passengers will be safe from this quickly-spreading illness, we are urgently calling on American Airlines and the federal government to err on the side of caution and halt all flights to and from China. Our safety is not for sale. We stand with our pilots.”