President Donald Trump said he would pull out of the World Trade Organization if it doesn't treat the U.S. better, targeting a cornerstone of the international trading system.

"If they don't shape up, I would withdraw from the WTO," Trump said Thursday in an Oval Office interview with Bloomberg News. Trump said the agreement establishing the body "was the single worst trade deal ever made."

A U.S. withdrawal from the WTO potentially would be far more significant for the global economy than even Trump's growing trade war with China, undermining the post-World War II system that the U.S. helped build.

Read alsoUkraine appeals WTO decision in dispute with Russia on fertilizer duties

Trump said last month that the U.S. is at a big disadvantage from being treated "very badly" by the WTO for many years and that the Geneva-based body needs to "change their ways."

In the Oval Office interview, Trump said at the WTO "we rarely won a lawsuit except for last year."

"In the last year, we're starting to win a lot," he added. "You know why? Because they know if we don't, I'm out of there."

Countries that bring complaints to the WTO tend to prevail and defendants in trade disputes lose.

The U.S. has won more than 90 percent of the cases that it has initiated and also brought more cases than any other WTO member, according to the Cato Institute, a Washington policy group that favors more open international trade. However, the U.S. has lost almost 90 percent of the cases brought against it at the WTO.