Washington (CNN) US farm bankruptcies were up 20% in 2019, despite the billions of dollars in aid President Donald Trump has paid to farmers hurt by the trade war with China.

That's the highest level since 2011, following the Great Recession, according to court data analyzed by the American Farm Bureau.

There were 595 Chapter 12 family farm bankruptcies, nearly 100 more than in 2018, the trade group said.

Trump's trade wars created a lot of uncertainty about markets. Negotiations with Canada and Mexico -- two of US farmers' biggest export markets -- over the rewrite of the North American Free Trade Agreement went on for more than two years. China retaliated to Trump's tariffs with duties on a range of American farm goods. As a result, exports of soybeans to China nearly stopped for about a year. Prices plunged and a record number of soybeans to piled up in storage.

To make up for some of those losses, and shore up political support, Trump has allocated a $28 billion aid package for farmers over the past two years. Most of that money was paid to farmers directly, and about $4 billion was used to purchase surplus food for food banks and given to groups that promote agricultural aid.