WASHINGTON — The federal government will dole out up to $12 billion in "temporary relief" to struggling farmers who have been hurt by President Donald Trump's tariffs and trade war, the U.S. Department of Agriculture announced Tuesday.

Agriculture Secretary Sonny Perdue told reporters the total amount was "in line" with the estimated impact from retaliatory tariffs on U.S. agricultural exports.

The aid, which will be awarded to soybean, cotton, dairy, corn and hog farmers, as well as others, is scheduled to go into effect around Labor Day, officials said. Lawmakers from both parties, however, ripped the program, with many bashing it as another negative consequence of the president's trade actions.

Officials said the aid would be delivered in three ways: Direct assistance, for producers of soybeans, cotton, dairy, corn and hogs; a food purchase program under which the government will buy surpluses of beef, legumes and other products; and a trade promotion program.

Officials added that the aid, which does not require congressional approval, was designed to be a temporary stopgap for losses suffered by farmers amid a growing trade war.

Greg Ibach, the agency's undersecretary for marketing and regulatory programs, called the aid disbursement "a one-time program" and a "short-term bridge" designed "to help the president successfully negotiate these deals."

News of the aid package was first reported by The Washington Post.

The Trump administration's new emergency aid package comes just days after members of the Iowa Corn Growers Association met with lawmakers on Capitol Hill to express their growing concerns that they will not be able to keep their businesses afloat after this year’s harvest, if prices continue to drop due to the trade war.

Republican and Democratic lawmakers have echoed those concerns, but Trump has remained steadfast in pushing his trade goals.

Countries that have treated us unfairly on trade for years are all coming to Washington to negotiate. This should have taken place many years ago but,

as the saying goes, better late than never! — Donald J. Trump (@realDonaldTrump) July 24, 2018

Tariffs are the greatest! Either a country which has treated the United States unfairly on Trade negotiates a fair deal, or it gets hit with Tariffs. It’s as simple as that - and everybody’s talking! Remember, we are the “piggy bank” that’s being robbed. All will be Great! — Donald J. Trump (@realDonaldTrump) July 24, 2018

Earlier Tuesday, he tweeted: "Tariffs are the greatest!"

Later in the day, moments before the Agriculture Department announced the aid, Trump told a crowd in Missouri that they needed to be patient during the ongoing trade disputes, so he could continue pressing U.S. trading partners for better trade deals.

"You gotta stick it out, we gotta fight it. Nobody else fought it...they don't wanna have those tariffs put on them," Trump told a crowd in Missouri. "And the farmers will be the biggest beneficiary. Watch. We're opening up markets, you watch what's going to happen. Just be a little patient. They're all aiming at anybody that likes me."

The relief drew immediate criticism from some lawmakers. Sen. Ben Sasse, R-Nebraska, said, "This trade war is cutting the legs out from under farmers and White House's 'plan' is to spend $12 billion on gold crutches."

Sen. Rand Paul, R-Ky., ripped the White House's planned aid as "welfare for farmers."

Tariffs are taxes that punish American consumers and producers. If tariffs punish farmers, the answer is not welfare for farmers — the answer is remove the tariffs. — Senator Rand Paul (@RandPaul) July 24, 2018

"The farmers I talk to, it's a pretty common refrain, 'We want trade, not aid,'" said Sen. Ron Johnson, R-Wis. "We've spent decades developing these markets, let us have access to them. End the trade war now."

Sen. Bob Corker, R-Tenn., added that "instead of offering welfare to farmers to solve a problem they themselves created, the administration should reverse course and end this incoherent policy."

Sen. Debbie Stabenow, D-Mich., said she was "very frustrated" with Trump's tariffs and the resulting aid program.

The aid comes amid a growing trade war between the U.S. and other world powers that has had a particularly harmful effect on American farmers.

In March, after Trump in March announced a 25 percent tariff on steel imports and 10 percent tariff on aluminum imports from China, pork producers in the U.S. were hit with a retaliatory 25 percent tariff on their China-bound exports.

Trump expanded tariffs to products from Mexico, Canada, and the E.U. in the months after that, prompting those countries, too, to implement retaliatory tariffs placed on U.S. exports.

China has since increased its tariff on U.S. pork exports to 50 percent, and Mexico imposed its own 20-percent tariff on U.S. pork. While Mexico left American corn off of their list of goods with tariffs, both the E.U. and China levied an additional 25-percent tariff on the crop.

Those tariffs have caused corn farmers and pork producers, in particular, to take huge financial hits. Markets for both have seen a roughly 15 percent drop in prices since the spring when Trump slapped his first tariffs on imported steel and aluminum from overseas.

The new aid to farmers, however, could trigger further action by other countries.

The World Trade Organization, which Trump has also repeatedly criticized, has strict rules about whether nations can subsidize industries, including farming, that have been hurt by trade measures that their own governments initiated. Citing those rules, other WTO members could choose to file a formal complaint over the U.S. decision to provide aid to farmers.