By Patrick Graham

LONDON (Reuters) - It took just a few short minutes on Thursday to create the beginnings of a move that may bring down the financial world's most clear-cut trade of 2016.

It has been largely plain sailing for those betting on a weaker British pound since the launch of a sustained period of selling a year ago on the idea that Britain's vote on whether to leave the European Union might be a very close thing.

Those bets reached record levels as polls tightened before the referendum in June, and since the vote to leave they have accelerated on signs that Prime Minister Theresa May favors a "hard" exit that would also take Britain out of the single market.

Sterling <GBP=> <EURGBP=> was one of the worst-performing currencies in the world last month, dumped by investors along with the likes of the Egyptian pound <EGP=> and the Nigerian naira. <NGN=>

Custodial banks who serve "real money" investors - big global pension and investment funds that tend to set the broad direction in the markets, say they have all piled in to structures that bet on a weaker pound. http://tmsnrt.rs/2fKYToc

Likewise, the stepped nature of the fall since June has played well for many of the hedge funds, banks and other short-term investors who dip in and out of currencies with high-risk, heavily leveraged bets.

All of that now feels threatened after the London High Court's ruling on Thursday that May must have parliament's approval to trigger the Brexit process in Brussels.

The ruling throws doubt on the government's timetable for launching Brexit talks, hands substantial ammunition to "Bremainers" and supporters of softer terms of departure, and even puts the idea of an election this year on the table.

Add expectations of a sharp fall in the dollar if Donald Trump wins the White House on Tuesday, and you have a recipe for heightened nerves in trading rooms in London and New York over the next few days.

"The only FX consensus position that hasn't been challenged this month is short sterling," said Richard Benson, co-head of portfolio investment for Millennium Global in London, a specialist firm that manages currencies for major asset managers.

"If you got a Trump victory next Tuesday it would be majorly challenged. If we were to wake up to sterling at $1.2650 or higher, watch out, we could go anywhere."

STOCKS PUTS

Anecdotally, banks report some foreign investors have simply sold selected UK assets over the past three months or, once sterling had fallen substantially, bought in and hedged - for which, read "sold" - the currency to lock in the gain.

But the clearest visible trend has been one of buying blue-chip FTSE100 shares and selling mid-caps on the assumption the bigger UK-based global firms will benefit from a weaker pound making exports more competitive.

French bank BNP Paribas on Friday recommended backing out of that trade.

"The pound is already pricing in a 'worst-case' Brexit scenario, suggesting that UK equity investors now need to prepare for the winter via FTSE100 puts," equity and derivative strategist Ankit Gheedia wrote in a note to clients.

But it is the scale of the consensus on the currency that worries many.

As this pair of charts shows, sterling positioning is now at its most stretched ever in favor of more weakness. In seven previous periods over the last two decades when extreme short sterling positions on the Chicago Mercantile Exchange have been amassed, the currency has bounced back an average of 12 percent in the subsequent weeks and months.

The big exception was its 32 percent plunge in 2008-09 during the global financial crisis. http://tmsnrt.rs/2ekQXEX

Analysts at Goldman Sachs said that the High Court ruling could make even its near-term target of $1.20 harder to reach.

"It reduces the odds that Article 50 will be triggered by March and, more fundamentally, may limit how aggressive the government can be in its negotiating position," they said.

"The probability of 'hard Brexit' has shrunk, which could see sterling settle around $1.26 in the near term."

A Reuters poll of more than 60 forex strategists earlier in the week suggested sterling may drop around 5 percent against the dollar soon after Britain starts formal divorce proceedings from the EU.

The median view one-month forecast in the poll was $1.22, but 12 forecasters said sterling could be trading at $1.24 or higher in a month's time.

(Additional reporting by Alistair Smout and Vikram Subhedar; Graphics by Jamie McGeever; Editing by Hugh Lawson)