US President Donald Trump rebuked the European Union on Twitter late Wednesday over what he said was its "tough" stance on Brexit and its "brutal" behavior as a trading partner.

EU leaders on Wednesday offered UK Prime Minister Theresa May a Brexit extension until October 31, refusing her request to lengthen the process only to June.

Trump said the EU was a "brutal trading partner with the United States," adding that sometimes "it all comes back to bite you."

Earlier this week, the US threatened tariffs on over $11 billion worth of EU goods.

US President Donald Trump sent an ominous warning to the European Union on Twitter that what he called its "tough" stances on Brexit and US trade would come "back to bite you."

Trump tweeted late Wednesday night that it was "too bad that the European Union is being so tough on the United Kingdom and Brexit" after EU leaders earlier in the evening offered UK Prime Minister Theresa May a Brexit extension until October 31.

May had been looking for a shorter extension to avoid taking part in the coming European elections and promised to get her deal through UK Parliament by the end of June, but EU leaders rejected her request.

Read more: What happens now that Brexit has been delayed until October 31?

Trump also slammed the EU as a trading partner in his Wednesday-night tweet, and pledged to "change" that.

"The E.U. is likewise a brutal trading partner with the United States, which will change," he wrote. "Sometimes in life you have to let people breathe before it all comes back to bite you!"

The EU and the US are taking part in slow-moving trade talks marked by escalating tensions and threats of tariffs.

The Trump administration has attacked the EU's strict rules for things like food standards.

The US this week began threatening tariffs on $11.2 billion worth of EU goods shipped to the US. That's in retaliation to what the US says are unfair subsidies for the aircraft manufacturer Airbus, the biggest rival of the US manufacturer Boeing.

Read more: The US is threatening tariffs on $11 billion worth of European goods over subsidies to Airbus, whose rival Boeing is enduring its most difficult period in decades

US Trade Representative Robert Lighthizer said the EU's subsidies had harmed the US economy.

Among the products facing tariffs are wine, cheese, fruit, oils, and clothing.

The World Trade Organization has ruled on the long-running complaints over subsidies and found that both the US and the EU have unfairly subsidized their aircraft manufacturers.

Trump and the European Commission's president, Jean-Claude Juncker, at the White House in July. Win McNamee/Getty Images

In a tweet this week, Trump accused the EU of having "taken advantage of the U.S. on trade for many years."

A European Commission representative on Tuesday said the EU was preparing its own list of tariffs it might impose on US goods.

The US previously threatened tariffs on European cars, with the EU saying it would react to such measures "in a swift and adequate manner."

The US and the EU managed to reach an agreement to avoid a trade war last July, but Trump has since continued to express frustration with the EU.