What was once the world's largest bitcoin exchange, Mt. Gox, appeared near collapse on Monday, the latest symbol of the woes facing early players in the world of virtual currencies.

Mt. Gox, based in Tokyo, has had a rough ride lately. A few days after cutting off withdrawals for customers, Mt. Gox said that its problems were a result of a more fundamental flaw in the computer programme that underlies bitcoin.

That news touched off a sell-off in virtual currency markets Monday morning, briefly leading to a swoon of more than 20% in the price of bitcoin, to $535. The price recovered somewhat after developers and researchers in the bitcoin community said the problems were less an indication of flaws in the currency than of bad decisions at Mt. Gox.

"This just confirms what everyone in the bitcoin community has known for a while: Don't use Mt. Gox," said Sarah Meiklejohn, a graduate student at the University of California, San Diego who studies virtual currencies.

Mt. Gox is not the only early leader in the virtual currency world to stumble as bitcoin has grown more popular. Charles Shrem, a founder of one of the most popular early bitcoin websites, BitInstant, was arrested in late January and accused of helping people make drug purchases with bitcoins.

Edward W Felten, a professor at Princeton University who has studied bitcoin, said, "We're seeing a shakeout where the companies that are weaker in terms of management and technical execution are being weeded out."

At the same time, bitcoin developers did acknowledge that weaknesses remained in the currency's underlying protocol and that more work was needed to ready the currency for widespread use.

"This is a good reminder that bitcoin is still young and experimental," the lead developer at the Bitcoin Foundation, Gavin Andresen, said in a statement Monday.

Bitcoin has drawn many fans because it runs according to computer code, and is thus theoretically immune to human error. Some critics, though, have long said that computer code can be susceptible to flaws or manipulation.

The problems at Mt. Gox came after what had already been a bad week for bitcoin, which many believe holds the promise of becoming a faster, cheaper way of moving money around the world.

The Russian government announced that it would treat virtual currency transactions as illegal. The Prosecutor General's Office in Russia said that "citizens and legal entities risk being drawn - even unintentionally - into illegal activity, including laundering of money obtained through crime, as well as financing terrorism."

Russia had been one of the places where bitcoin was growing the fastest. In the US, officials have generally been cautiously supportive. But on the same day as the Russian announcement, police charged two men in Florida with using bitcoins to launder money.

The recent big movements in the price of bitcoin seem to be driven largely by the turmoil at Mt. Gox. Last week, a growing number of customers were complaining about their inability to withdraw money from their Mt. Gox accounts. Then on Friday, the company officially stopped any further withdrawals.

On Monday, the currency plummeted, trading at about $650 by evening, down from about $850 at the beginning of last week.

Founded initially as a place to trade a type of card used in role-playing games, Mt. Gox became a bitcoin exchange in 2010 and quickly rose to become the most popular place to acquire the virtual currency for government-issued currency.

But the company has suffered several setbacks. In 2011, a hacking attack helped precipitate the first crash in the price of bitcoin. In the years that followed, Mt. Gox had trouble processing customer transactions at times, slowing trade. And last May, US authorities seized the company's American bank accounts, saying it had not properly registered as a "money transmitter."

Since then, Mt. Gox has filed the necessary paperwork and tried to recoup its early success, but many customers have been suspicious. Those using the exchange have complained that it has not been easy to move money in or out. The exchange's market share for dollar transactions has fallen to about 20% from more than 80% early last year, according to the Genesis Block, a research firm.

Still, Mt. Gox's contentions about the bitcoin code were taken seriously on Monday because they raised basic questions about the soundness of the currency.

From the creation of bitcoin in 2009, one of the most important and vaunted features of its protocol was its ability to prevent the same coins from being moved to two different places at the same time. In its announcement Monday, Mt. Gox said that a bug in the bitcoin software made it possible for someone to use the bitcoin network to alter transaction details to make it appear that a bitcoin transfer had not taken place when, in fact, it had.

The company said: "We have discussed this solution with the bitcoin core developers and will allow bitcoin withdrawals again once it has been approved and standardized."

Other exchanges did not report similar problems, and Felten of Princeton said that the issue described by Mt. Gox had been known for years and dealt with by other companies through some simple coding changes.

"It does say something about the rough edges of the bitcoin technology," Felten said.

At the same time, he added, "It's an issue that is likely to be fixed in the longer run, and that can be programmed around."