LONDON (Reuters) - A dramatic rally in digital currency bitcoin came to a spectacular end on Thursday with a plunge of up to 20 percent as China’s yuan rose sharply - further evidence of an intriguing inverse relationship between the pair.

A sticker reading "Bitcoin accepted here" is displayed at the entrance of the Stadthaus town hall in Zug, Switzerland, August 30, 2016. Picture taken August 30, 2016. REUTERS/Arnd Wiegmann

Bitcoin had gained more than 40 percent in two weeks to hit a three-year high of $1,139.89 on Wednesday, just shy of its all-time record of $1,163 on the Europe-based Bitstamp exchange BTC=BTSP. But it dived as low as $885.41 on Thursday as the yuan jumped by over 1 percent in offshore trading and headed for its strongest two-day performance on record. CNH=D3 [CNY/]

Chinese exchanges have reported high volumes of trading of the web-based “cryptocurrency” over the past year, during which time the yuan has shed almost 7 percent, its worst annual performance since 1994, while bitcoin has surged 125 percent, outperforming all other currencies for a second year in a row.

Bitcoin can used for moving money across the globe quickly and anonymously, and operates outside the control of any central authority. That makes it attractive to those wanting to get around capital controls, such as in China, and also to investors who are worried about a devaluation in their currency.

“Given that the yuan’s weakness over recent months seemed to correlate with bitcoin’s strength more than any other currency, it’s no surprise that bitcoin traders have reacted the way they have to the yuan’s sudden strength today,” said Paul Gordon, co-founder of London-based Quantave, a firm seeking to make it easier for investors to access digital currency exchanges.

Exchanges in China say they account for more than 90 percent of global bitcoin trading, which would help explain why a shift in Chinese demand would sharply affect the price.

But many bitcoin experts say Chinese exchanges overstate their volumes in the digital currency, and attribute sharp moves to speculation by, for example, U.S.-based hedge funds.

Some said bitcoin’s fall was a natural reaction to the speed of its previous rise. It is still up more than 50 percent on three months ago, when it was trading at around $600,

“If something goes up very rapidly...people make a lot of money, and at some point they’re going to want to sell, in order to realize their gains,” said Marco Streng, CEO of bitcoin mining and trading firm Genesis Mining.

By 1645 GMT (11:45 a.m. ET), bitcoin had recovered some of its earlier losses to trade down almost 15 percent on the day at around $950, still leaving it on course for its worst performance in a year.

On some digital currency exchanges - of which there are dozens - bitcoin did reach record highs late on Wednesday.

“Once we broke through the nominal all-time high, liquidity dried up - no shorts, no sellers, which means a volatile little bubble formed quickly,” said Peter Smith, CEO of London-based Blockchain, the biggest bitcoin wallet-provider globally.

“We are seeing the effects of that now as it breaks. It’s still fairly thin trading volume though, so who really knows where it goes next.”

For a graphic on the bitcoin economy, click

For a graphic on bitcoin exchange rates, click here