The U.S. Department of Agriculture has pledged up to $500 million to prevent the spread of the fatal pig virus African swine fever, after Haiti and the Dominican Republic recently confirmed outbreaks.

A U.S. outbreak would likely slash American pork exports and pig prices, hurting rural farmers and meat companies like Tyson Foods Inc.

African swine fever is harmless to humans but often deadly to pigs, leading to financial losses for farms. Governments also often block pork imports from countries where the disease has been found to prevent transmission.

The USDA said it would commit funds from its Commodity Credit Corporation spending authority to expand and coordinate monitoring and surveillance for the disease, along with other efforts.

“This is unprecedented both in terms of the amount dedicated to one animal disease and of getting the funds upfront, before we have the disease in the U.S.,” said Bob Acord, a former USDA administrator who is now a consultant for the National Pork Producers Council.

African swine fever originated in Africa before spreading to Europe and Asia and has killed hundreds of millions of pigs. The disease spread rapidly in China starting three years ago and wiped out half the country’s hog herd within a year.

The Dominican Republic’s outbreak in July was the first in the Americas in nearly 40 years. It increased worries about the risk for U.S. cases, particularly after Haiti also confirmed an outbreak this month.

The USDA told Reuters it has spent about $400,000 in the Dominican Republic to help the country respond to African swine fever.

“ASF outbreaks have proven devastating in other parts of the world due to lost production and trade,” the USDA said.

U.S. Customs and Border Protection is increasing inspections for illegal pork on flights from Haiti and the Dominican Republic and making sure airplane garbage is properly disposed of to prevent transmission of the disease, the USDA has said.