Image copyright AFP Image caption Mr Trump has been embroiled in tit-for-tat trade battles on several fronts in recent months

President Donald Trump has threatened to withdraw the US from the World Trade Organization (WTO), claiming it treats his country unfairly.

"If they don't shape up, I would withdraw from the WTO," Mr Trump said in an interview with Bloomberg News.

The WTO was established to provide rules for global trade and resolve disputes between countries.

Mr Trump says the body too often rules against the US, although he concedes it has won some recent judgments.

He claimed on Fox News earlier this year that the WTO was set up "to benefit everybody but us", adding: "We lose the lawsuits, almost all of the lawsuits in the WTO."

However, some analysis shows the US wins about 90% when it is the complainant and loses about the same percentage when it is complained against.

Mr Trump's warning about a possible US pull-out from the WTO highlights the conflict between his protectionist trade policies and the open trade system that the WTO oversees.

Washington has recently blocked the appointment of new judges to the WTO's Geneva-based dispute settlement body, which could potentially paralyse its ability to issue judgments.

US Trade Representative Robert Lighthizer has also accused the WTO of interfering with US sovereignty.

It comes as President Trump set a Friday deadline for Canada to sign a new agreement with the US and Mexico. He has threatened to tax the country's automotive sector or cut it out entirely.

What's Trump's issue with the WTO?

The US president has been sounding off about unfair trade since even before he became president.

Mr Trump said on Thursday that the 1994 agreement to establish the WTO "was the single worst trade deal ever made".

The US has been embroiled in a tit-for-tat trade battle on several fronts in recent months.

The one creating the most interest is with China, as the world's two largest economies wrangle for global influence.

Mr Trump has introduced tariffs on a number of goods imported into the US.

A third round of tariffs on $200bn (£154bn) of Chinese goods could come as soon as a public-comment period concludes next week, according to a Bloomberg report citing various sources.

Asked to confirm this during the Bloomberg interview, President Trump said that it was "not totally wrong".

China has responded to US tariffs by imposing retaliatory taxes on the same value of US products and has filed complaints against the tariffs at the WTO.

China's commerce ministry has said it "clearly suspects" the US of violating WTO rules.

An initial complaint at the WTO was filed by China in July after Mr Trump imposed his first round of tariffs.

Media playback is unsupported on your device Media caption Donald Trump speaks with the Mexican leader on the phone through an interpreter

The WTO is at the heart of the system of rules for international trade. It is the forum for sorting disputes between countries about breaches of global trade rules and for negotiating new trade liberalisation.

The EU, meanwhile, is trying to steer the US towards reforming the WTO rather than abandoning it.

Bernd Lange, chair of the European Parliament's trade committee, told Politico magazine that it would submit plans to overhaul the organisation in September. He said it would test whether the US was really interested in reform.

"This is certainly about calling [America's] bluff," he said.

What about other trade deals?

Mr Trump has not been a fan of multilateral trade agreements.

In a 2016 presidential debate with Democratic rival Hillary Clinton, Mr Trump described the North American Free Trade Agreement (Nafta) with Mexico and Canada as "the worst trade deal maybe ever signed anywhere" and a "killer" of US jobs.

Once in office he said he wanted to renegotiate - not scrap - the accord, triggering a year of talks.

On Monday, Mr Trump announced that the US and Mexico had agreed to revamp Nafta, calling it a "really good deal" that was "much more fair" for both countries.

Canada is yet to agree to the new terms.

On Thursday, Mr Lighthizer held talks in Washington with Canadian Foreign Minister Chrystia Freeland aimed at reaching a new deal.

Following four separate meetings, which continued late into the night, Ms Freeland told reporters that a deal could not be reached, adding that talks would resume on Friday.

Also during his election campaign Mr Trump railed against the Trans-Pacific Partnership (TPP), a 12-nation trade deal that was a linchpin of former President Barack Obama's Asia policy.

Mr Trump said the deal was a "potential disaster for our country".

One of his first acts as president was to withdraw the US from the TTP, although he has since said he might consider rejoining if the terms were "substantially better".