The Trump administration plans to offer up to $12 billion in aid to farmers hit by tariffs on their goods, an emergency bailout intended to ease the pain caused by Trump's escalating trade war in key electoral states, Secretary of Agriculture Sonny Perdue told reporters Tuesday.

"President Trump has promised since day one that he had the back of every farmer and rancher," Perdue said. He said the assistance was a short-term solution, but that it would offer "Trump and his administration time to work on long-term trade deals."

The announcement came Tuesday afternoon, hours after the president proclaimed on Twitter that "Tariffs are the greatest!" The aid will be facilitated by the Commodity Credit Corp, an agency set up during the Great Depression, and will not require congressional approval.

Read more: Trump's tariffs take a toll on farmers in Pennsylvania ahead of midterms

The aid will come from a mix of programs overseen by the USDA, including direct payments to producers of some goods, including soybeans, as well as distribution assistance for producers of goods that can be easily provided to food banks, such as fruits, nuts, rice, legumes, and some meats. A third program, looking to build international markets, is open to producers of all commodities.

Shares of Deere & Company, the Illinois-based tractor maker that owns the brand John Deere, were up more than 3 percent after news of the bailout plan was reported earlier Tuesday.

President Donald Trump has hit several of America's major trading partners with tariffs on billions of dollars' worth of goods, and has shown few signs of slowing. Earlier this month, 25 percent tariffs on $34 billion of Chinese imports of machinery and electronics went into effect, prompting Beijing to respond with dollar-for-dollar tariffs on American exports of soybeans and other goods.

Trump has threatened to impose broader tariffs on as much as $500 billion of Chinese goods, which has alarmed economists as well as farming groups. The administration released a list of $200 billion in Chinese goods that would receive a 10 percent tariff on July 10.

Casey Guernsey, whose family has been farming in Missouri since the 1840s, said the Trump administration's plan was not sustainable. Guernsey, a spokesperson for Americans for Farmers and Families, told CNBC Tuesday that the plan could heighten uncertainty in what's already a down market.

"You only have so many calves that are born every year, and there’s only one time to harvest a crop, so you really have to make the best decision you can on any given day for the upcoming year," Guernsey said. "We don’t want to pin our hopes on a check from the government every month."

A group representing soybean farmers also came out against the administration's plan, and pushed for the elimination of tariffs.

"While soybean growers appreciate the Administration’s recognition that tariffs have caused reduced exports and lower prices, the announced plan provides only short-term assistance," the American Soybean Association said in a statement. "ASA continues to call for a longer-term strategy to alleviate mounting soybean surpluses and continued low prices, including a plan to remove the harmful tariffs."