The union representing United Parcel Service pilots on Wednesday said it had reached an agreement with the shipping giant making flights in and out of China voluntary due to the deadly and rapidly spreading coronavirus.

"Following days of discussions, UPS agreed and signed a Coronavirus Letter of Agreement with the IPA that gives our pilots the right to take a personal leave of absence for trips containing a flight segment into, or out of, mainland China," Robert Travis, president of the Independent Pilots Association, said in an emailed statement.

The accord comes in response to concerns voiced by pilots over safety due to the virus that as of Wednesday morning had killed 492 people— virtually all of them in mainland China — with more than 24,000 others infected.

The agreement reached Tuesday night called for a three-day transition period before the pact is fully implemented and "all UPS flights into, and out of, mainland China will be operated on a voluntary basis," according to IPA.

Get Breaking News Delivered to Your Inbox

UPS confirmed reaching an agreement with the IPA that it said would ensure crew staffing on flights into and out of China.

"Crew members who notify the company that they are not comfortable flying China routes due to coronavirus concerns will be temporarily replaced on those flights, ensuring UPS will continue to provide air express service for our customers," a UPS spokesperson stated in an email.

UPS is prioritizing healthcare and aid shipments for companies and partners who send supplies to China, the spokesperson added.

Major U.S. airlines suspended flights to mainland China after the State Department issued a travel advisory last week. In addition, American and United airlines are temporarily halting flights to Hong Kong, citing weak demand for flights amid the coronavirus outbreak.