AP/Jae C. Hong

President Donald Trump on Wednesday lashed out at China over retaliatory tariffs targeting US farmers.

Beijing imposed tariffs on $34 billion worth of US products, including soybeans, earlier this month.

China is the biggest importer of US soybeans.

President Donald Trump on Wednesday lashed out at China over the latest escalation in the trade spat between the world's two largest economies.

"China is targeting our farmers, who they know I love & respect, as a way of getting me to continue allowing them to take advantage of the U.S.," Trump tweeted. "They are being vicious in what will be their failed attempt. We were being nice - until now! China made $517 Billion on us last year."

It's unclear what number Trump was referring to. The US trade deficit with China in 2017 came in at $375.6 billion, according to Census Bureau data, though adding that figure to this year's data through May comes out to about $528 billion.

Trump's tweet comes less than 24 hours after the US Department of Agriculture authorized $12 billion of support for farmers and ranchers hurt by tariffs imposed by China.

The Trump administration imposed tariffs of 25% on about $34 billion worth of Chinese goods earlier this month and has another $16 billion pending. Beijing retaliated with tariffs of its own on $34 billion worth of American goods, including soybeans. Trump has threatened to place tariffs on all $505 billion worth of Chinese goods imported by the US.

China is the largest buyer of US soybeans, importing about $14 billion worth of the legume in 2016, according to the US Department of Agriculture. But the country has been pursuing other avenues as trade tensions with the US have flared. Kevin McNew, an economist at Farmers Business Network, told Business Insider that China had bought at least 2.5 million metric tons of soybeans on forward contracts he expected to be canceled following the tariff implementation.

Soybeans are down 10.22% this year through Tuesday.

Gina Heeb contributed to this report.

NOW WATCH: Here's why the US Men's team sucks at soccer