The union that represents United Parcel Service pilots said Wednesday it has reached an agreement with the delivery giant to make flying to mainland China "voluntary" as the coronavirus spreads.

"This joint effort addresses crewmember concerns over safety during the coronavirus health crisis," the union said in a statement.

Pilots who tell the company that they aren't comfortable flying China routes because of coronavirus will be "temporarily replaced on those flights," UPS said in a statement.

If pilots opt out of trips to mainland China they will have to take an unpaid leave of absence, but they can also use paid sick leave if they aren't rescheduled on another route, the union said.

UPS said it is prioritizing health care and aid shipments for companies that send China supplies.

"In the meantime, we are using the flexibility of our network to redirect assets to support other shipping lanes where there continues to be demand," the company said in a statement.

More than a dozen airlines, including Delta, United and American have suspended service to mainland China and to Hong Kong, citing a sharp drop in demand because of the outbreak. Others have significantly scaled back service. The cuts mean fewer passenger-plane bellies to fill with cargo, which would normally be a boon to cargo carriers, but concerns about the virus have led to more uncertainty for these air freight companies.

The air cargo industry had been struggling before the outbreak, which has so far sickened more than 24,000 people, mostly in China, and killed more than 400.

Earlier Wednesday, the International Air Transport Association said air cargo demand fell 3.3% in 2019, making it the worst for the sector since 2009 and the first decline since 2012.

While trade tensions have eased, "there is little relief in that good news as we are in unknown territory with respect to the eventual impact of the coronavirus on the global economy," said IATA's director general Alexandre de Juniac. "With all the restrictions being put in place, it will certainly be a drag on economic growth. And, for sure, 2020 will be another challenging year for the air cargo business."

FedEx, for its part, on Wednesday said work and travel restrictions in Wuhan, the epicenter of the outbreak, may delay some shipments from there and others in Wuhan province. But the company said it is operating its regularly scheduled flights to and from China "as local conditions and restrictions allow."

The company has been handing out surgical masks, hand sanitizer and alcohol wipes to its employees and contractors working at its China facilities. Those employees are "temperature checked when reporting to work," it added.