By William Schomberg

LONDON (Reuters) - The shaky world economy faces a potentially severe test in the coming week, when Britain could turn its back on the European Union, which would shock financial markets and put pressure on already stretched central banks to prevent a new slump.

As well as delivering at least a short-term hit to the British economy and its trading partners, an "Out" vote in Thursday's referendum would raise questions about the future of the EU, which accounts for nearly a quarter of global output.

It would also add to nervousness among investors about the rising anti-establishment mood in many rich economies, just as Republican candidate Donald Trump gears up to fight the U.S. presidential election on a populist platform.

With opinion polls showing support for "Leave" in the lead and investors already in a highly defensive mood, the world's most powerful central banks are nervously awaiting the outcome.

"Clearly this is a very important decision for the United Kingdom and for Europe," Federal Reserve Chair Janet Yellen said on Wednesday after the U.S. central bank kept interest rates on hold. "It is a decision that could have consequences for economic and financial conditions in global financial markets."

Switzerland's central bank has said it will try to counter a surge in the safe-haven franc in the event of a Brexit and officials in Japan have expressed similar concerns, raising the possibility of fresh upheavals in foreign exchange markets.

An "Out" vote could also cause the Fed to put on ice its next rate hike and coordination between central banks around the world might eventually be needed, analysts say.

The timing of a possible new shock to the world economy looks bad. Eight years after the worst of the financial crisis, global growth remains weak and is highly dependent on unprecedented stimulus from central banks which are running low on options for more support.

The Organization for Economic Co-operation and Development estimates that economic output in the EU, not including Britain, will be around 1 percent weaker by 2020 than otherwise if Britain leaves the bloc.

This amounts to a palpable hit for the region which is growing only weakly, with knock-on effects beyond its borders.

The OECD warned that the impact would be much stronger if a Brexit undermined confidence in the future of the EU, something which could hit stock markets and hurt companies and governments by pushing up their borrowing costs.

OECD chief economist Catherine Mann said a Brexit would be "bad for the UK, bad for Europe and bad for the global economy."

The International Monetary Fund has also said a vote for Britain to quit the EU, which it joined in 1973, could hurt the global economy.

WORSE THAN 2008?

For some, the countdown to Thursday's vote has echoes of the worst of the global financial crisis, especially in Britain where the economic impact of Brexit would be felt most sharply.

Alistair Darling, who was British finance minister when the crisis struck, told an "In" campaign event this month he was more worried by the referendum than he was in 2008 as Britain headed for its deepest recession since the 1930s Depression.

The OECD has said British economic output could be 3 percent lower by 2020 than if it stayed in the EU.

But Mike Amey, a managing director at PIMCO, one of the world's biggest investment firms, said a Brexit, while capable of pushing Britain into a short recession, represented less of a risk than the euro zone's existential crisis of recent years or the near meltdown of banks in the financial crisis.

"We don't think that even in the event of a troubled Brexit, a bad divorce, that you get to the point where the UK banking system is under serious stress," he said.

Brexit supporters have spent much of the campaign dismissing forecasts of a major economic hit after an "Out" vote.

Gerard Lyons, who has advised leading "Out" campaigner Boris Johnson, predicts a Nike swoosh-shaped path for Britain after a vote to leave -- a short downturn followed by steady uptick -- and says there are bigger problems worrying global markets.

"Since August we have seen considerable bouts of volatility. Brexit is just the latest global issue and it needs to be seen in that context," Lyons said.

It is hard to find that kind of relaxed view outside the Brexit camp.

Peter Sands, who stood down as chief executive of Standard Chartered bank last year, said an "Out" vote could have "very significant economic consequences".

Although banks are in better shape than they were eight years ago, after being ordered by authorities to put more money aside, financial markets would be very volatile and the real economy would be buffeted by the ensuing uncertainty, he said.

"One of the things I have learnt from my time in banking is to be quick to say I don't know what is going to happen," Sands said.

(Writing by William Schomberg; Additional reporting by Sinead Cruise and Lawrence White; Editing by Catherine Evans)