The pilots’ union at American Airlines Group Inc. told members to decline further flights to China because of the health risk posed by the coronavirus, and sued the carrier in an effort to halt service there.

The danger is too great for passengers and crew to continue flying given the uncertainties around the disease, the Allied Pilots Association said Thursday. The labor group asked a Dallas judge to block American’s flights to China because of the virus, which was declared a global health emergency by the World Health Organization.

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

The union’s directive complicates American’s plan to continue at least some service between the world’s two largest economies. American, Delta Air Lines Inc. and United Airlines Holdings Inc. have pared but not eliminated flights between the U.S. and China. In Europe, British Airways will suspend service to China until March 1 while carriers including Air France and Deutsche Lufthansa AG plan to halt flights until Feb. 9.

In declaring the virus a global health emergency, the WHO didn’t recommend restrictions on travel or transportation. Instead, the United Nations agency left such decisions up to individual countries and companies.

‘Necessary Precautions’

American said it was aware of the union’s legal filing.

“We are in close contact with the Centers for Disease Control and Prevention and global public health officials to make sure we are taking all necessary precautions for our customers and team members,” American said. The company said it would update its approach as needed.

American’s flight attendants’ union expressed support for the pilots and urged the airline and the U.S. government to halt all flights to and from China.

“Every precaution must be taken to safeguard the health of our American Airlines crew members and passengers,” the Association of Professional Flight Attendants said in a statement.

The Fort Worth, Texas-based airline makes five daily roundtrips between the U.S. and China, including Hong Kong, and the union estimated that each plane carries as many as 300 people.

Flight crews spend about 32 hours in China between flights to meet federal rest regulations, Ferguson said. Pilots in China should make return flights, he said.

American said Wednesday it would suspend flights from Los Angeles to Shanghai and Beijing from Feb. 9 through March 27. The company will continue service between those cities and its hub at Dallas-Fort Worth Intercontinental. It also is flying from Los Angeles and Dallas to Hong Kong.