Image copyright Getty Images Image caption WTO: An organisation under threat?

Sitting grandly on the banks of Switzerland's Lake Geneva is the headquarters of the World Trade Organization (WTO), a free trade factory.

Here the world's nations meet to hammer out trade deals and reduce tariffs - taxes charged on imported goods.

But the system, which has been working in various guises since the 1940s, is under threat from two sides.

The USA has announced tariffs on imports of foreign steel and aluminium on the grounds of national security, and it is refusing to appoint new members to the WTO's appellate body that settles disputes.

These developments come as the WTO is of increasing importance to the UK. At the moment it is represented by the EU, but after Brexit the UK will negotiate on its own account. This should give the UK the ability to negotiate deals more specifically designed to suit it.

The downside is that the UK will no longer belong to the biggest single trading economy in the world - the EU.

Brexit consequences

The first job of the newly increased UK team at the WTO will be to negotiate a "schedule", an extensive list of goods, and the tariffs to be paid on them; ranging from avocados to zips.

The UK assumed it could just inherit the EU's schedule. The trouble is that this requires the consent of other countries, and some of them have said no.

Image caption After Brexit the UK will negotiate on its own account at the WTO

Take New Zealand, for instance. At the moment it can sell 228,000 tonnes of lamb and mutton to the EU every year, with no tariffs. The UK and the EU decided to split that quota between them, but New Zealand objected.

David Walker, is New Zealand's ambassador to the WTO: "Yes, we and a range of other WTO members made clear that a simple quota split like that is not acceptable to us."

The reason is simple. At the moment New Zealand can sell that lamb anywhere in the EU, so it loses flexibility if it has to sell some in the UK and the rest of the EU.

Image copyright Getty Images Image caption Lamb exports have been a key part of New Zealand's economy since the late 19th Century

The UK can probably get round such problems, by offering countries like New Zealand a better deal. But there are other clouds on the horizon. For a start, the WTO hasn't managed to negotiate a global cut in tariffs for decades for one simple reason - every single country has a veto.

Ieva Barsauskaite, from the Lithuanian delegation to the WTO, warns me that getting all 164 countries on board is not easy.

"Get 164 friends of yours to one place, decide on a dinner, decide on one dish for all, and include the single mothers, the teenagers, retired veterans and everyone with a dog, and people with allergies - that's how the trade deals are being made here," she says.

Image caption Getting all the WTO's 164 members to agree on an issue is difficult, says Lithuania's Ieva Barsauskaite

For the UK, which is hoping to breathe new life into the WTO, that is not very encouraging. But there are bigger problems.

Trade war threat

Donald Trump's decision to impose tariffs on steel and aluminium is a game changer, not because this hasn't been done before - it has. But because he has done so on "national security" grounds - the one WTO rule that cannot be challenged.

All countries can take actions to guarantee their national security, but are only expected to do so at times of real crisis, like a real war.

But now in peacetime, President Trump has cited national security as a reason for tariffs. If others follow suit the escalation could be impossible to stop or reverse.

Image copyright Getty Images Image caption The risk is that a trade war could trigger an economic recession, says WTO boss Roberto Azevedo

No wonder that Roberto Azevedo, the WTO's director-general, is worried: "Just the threat of a trade war is already damaging," he told the BBC.

"But if this escalation goes on, and on, and on, you may have something very, very damaging - even the possibility of a recession. And if you look back in history, you know, in the 1930s, that's exactly where it led.

"That is why I have been saying, 'stick to the rules, do things according to the rules', because if others don't like it, there are mechanisms to take care of that," he says.

No appeal court

But those mechanisms themselves are also now under threat. The WTO's appellate body has been solving problems for more than 20 years, and its decisions have to be accepted by all members of the WTO. There is no veto.

Image copyright Getty Images Image caption Under President Trump, the US has been blocking appointments to the WTO's appellate body

But the appellate body is rapidly running out of members, as the US is blocking new appointments in an argument over their role. It needs a bare minimum of three members, though six or seven would be much better - at the moment it has just four.

"For over a year, it's not been possible to get a consensus amongst members to initiate the process for filling vacancies," says the WTO's director of legal affairs, John Adank.

"So, if this impasse continues, the risk is that the appellate body won't be in a position to function, because if it gets down to three or fewer members, it could be difficult to hear appeals."

Global Trade

More from the BBC's series taking an international perspective on trade:

The tranquil setting of the WTO, with its well-oiled collegiate atmosphere, has a comforting and comfortable feel to it, but it was based on a post-war consensus that has lasted ever since 1945.

President Trump has helped destroy that consensus - that there is a contract that everyone agrees to - with a few tweets and the threat of a trade war; putting the future purpose of the WTO in its castle on the shores of Lake Geneva in serious doubt.

You can hear more from Jonty Bloom on the World Trade Organization in the latest episode of Radio 4's In Business, broadcast at 20:30 BST, Thursday 19 April.