July 29 (Reuters) - The Dominican Republic is halting pig shipments in two provinces and mobilizing the military to contain the deadly hog disease African swine fever, the country's agriculture ministry said on Thursday.

U.S. testing of 389 samples from pigs raised on farms and in backyards in the Dominican Republic indicate the contagious disease is in "a small population of backyard pigs from Sánchez Ramírez and Montecristi provinces," according to a ministry statement.

The U.S. Department of Agriculture on Wednesday confirmed African swine fever in the Caribbean nation, raising concerns about the risk for the disease to enter the United States for the first time.

African swine fever is harmless to humans but often fatal to pigs. It originated in Africa before spreading to Europe and Asia and has already killed hundreds of millions of pigs, while reshaping global meat and feed markets.

The Dominican Republic will prohibit the movement of live and slaughtered pigs in Sánchez Ramírez and Montecristi and "quarantine both provinces," according to the statement posted on the ministry's website and provided by the Dominican embassy in Washington D.C.

There will be "total military control in all strategic points of both provinces," and the ministry will help disinfect affected areas, the statement said.

Sánchez Ramírez has 15,000 pigs and Montecristi has 4,600 pigs out of about 1.8 million nationwide, according to the ministry.

The Dominican Republic, with help from the United States and others, killed all its 1.4 million pigs to end its last outbreak of African swine fever in 1978, according to a report presented to the World Organisation for Animal Health (OIE) in 1982.

The USDA said it offered the Dominican Republic assistance with the latest cases and that "as of right now, they are managing it."

African swine fever spread rapidly in China starting in 2018 and destroyed half the country's hog herd, the world's largest, within a year. It sent global pork prices surging.

(Reporting by Tom Polansek in Chicago Additional reporting by Julie Ingwersen in Chicago Editing by Matthew Lewis)