The Trump administration pledged to pay farmers $4.7 billion to offset losses from trade disputes with foreign buyers of U.S. agricultural products.

Agriculture Secretary Sonny Perdue said the payments would help protect farmers from “unjustified tariffs” some nations have applied in response to President Trump’s trade policies. China, Mexico, the European Union and other trade partners have levied tariffs on U.S. farm goods from soybeans to pork to apples, leaving growers vulnerable during a downturn in the agricultural economy.

Farmers have been awaiting the details of the up to $12 billion in aid the U.S. Department of Agriculture promised to provide them in July.

Mr. Perdue said the payments would soften the blow to farmers while the Trump administration negotiates deals that benefit the U.S. economy overall, including agriculture. Farmers, he said, “cannot pay their bills with simple patriotism.”

Some farm groups said the spending won’t make up for losses from the trade clashes.