The Department of Agriculture plans to buy $20 million of stockpiled cheese to distribute to food banks and pantries nationwide in an attempt to stem farmer losses after dairy prices plummeted amid a global milk glut earlier this year.

The purchase of about 11 million pounds of cheese, which the USDA reported Tuesday in a statement, comes in addition to $11.2 million in subsidies for dairy producers announced earlier this month. A dairy lobbying group had asked for as much $150 million in cheese purchases.

"We understand that the nation's dairy producers are experiencing challenges due to market conditions and that food banks continue to see strong demand for assistance," Agriculture Secretary Tom Vilsack said in the statement.

A combination of plentiful supply and flagging global demand has put farmers on the back foot in recent years. Some American dairy cooperatives had so much milk this spring they were forced to dump tens of millions of pounds.

Yet more recently, producers in some parts of the country have seen premiums on the open market as food manufacturers struggle to purchase enough milk. Declining corn and soybean prices also mean lower feed costs for farmers.

Overall, 2016 dairy margins will shake out close to the five-year average and increase in 2017, encouraging modest expansion within the industry, said Bill Brooks, a Dearborn, Missouri-based dairy economist at INTL FCStone. Futures prices for Class III milk -- a category of the commodity used to make cheese -- has rebounded 45 percent since hitting at a six-year low in May in Chicago. That's reduced the need for federal aid, said Marin Bozic, a dairy economist at the University of Minnesota in St. Paul.

"The USDA wants to demonstrate that it's there for dairy," said Bozic, who said the market recovery is probably why the USDA's planned purchase amounts to less than the $150 million asked for. "In an election season, they want to do something, even if the market seems to be rallying."

The latest aid has come too late for Kipp Hinz, 27, a dairyman in Ellsworth, Wisconsin, who watched a trailer haul away his herd of 60 cows last month after shuttering his farm. Hinz said he couldn't afford to buy feed for the animals.

"It's heartbreaking," Hinz said in an interview. "When prices tanked, that was the time I really needed something to happen to work out a plan with the bank, renew my contracts and get more feed."

The pain is also being felt on other continents. In the past year, the European Union has issued two aid packages totaling $1.1 billion (1 billion euros), including incentives to cut output. In New Zealand, farmers are culling herds due to depressed prices and annual production there is forecast by the USDA to drop 2 percent in 2016. That's prompted the New Zealand central bank to stress-test the main lenders in the country, where the dairy industry accounts for 10 percent of bank lending.

One reason for the dairy's recent difficulties was a slowdown in Chinese demand, but the country may now be back in the market, with milk imports up 87 percent this year through May, according to the USDA. The price of whole milk powder sold by GlobalDairyTrade, an international dairy sales platform owned by New Zealand's Fonterra Cooperative Group, jumped 19 percent to $2,695 a metric ton in the most recent auction held last week.

"The bear market is over," said Matt Gould, a Philadelphia-based analyst for the Dairy & Food Market Analyst newsletter, said by phone. "The industry does not appear to be in a crisis."