DALLAS — The pilots’ union at American Airlines sued on Thursday to stop the carrier from flying to China and told members not to operate flights there because of the spreading coronavirus outbreak.

The Allied Pilots Association, which represents American’s 15,000 pilots, asked a state district court in Dallas for an injunction to halt the flights. The union cited declarations by international health experts that the virus is a public health emergency.

“The safety and well-being of our crews and passengers must always be our highest priority — first, last, and always,” union President Eric Ferguson said in a statement.

Ferguson noted that several international carriers have stopped flying to China. Union leaders asked American’s management to do the same, he said, “but to date they have not canceled any U.S.-China flights. We are therefore compelled to seek injunctive relief.”

American did not immediately respond for comment.

Earlier this week, American announced that it will suspend flights between Los Angeles and both Beijing and Shanghai beginning Feb. 9, while not changing the schedule of flights from Dallas-Fort Worth International Airport. The union is seeking to stop all the flights immediately.

Union spokesman Dennis Tajer said some pilots expressed concern about flying to China, but American didn’t force anyone to handle the flights.