Japan's emergence as a global center for cryptocurrencies didn't start with open-minded lawmakers or prescient investments by the country's financial giants.
Instead, it began with an American felon who arrived in the country looking for a fresh start.
Roger Ver came to Japan in 2006 after getting out of prison for selling explosives online and stumbled upon bitcoin in its early days.
He became an enthusiastic supporter who threw parties and gave away coins to encourage their use.
He also forged a relationship with Mark Karpeles, a young Frenchman in Tokyo who bought Mt Gox - then the world's largest bitcoin exchange - and relocated its headquarters to the city.
Together, the pair helped create a community of crypto experts who popularized the currencies, seeded early startups and persuaded government officials of the concept's potential.
That helped Japan emerge as a bitcoin haven, even as the rest of the world cracked down.
It has maintained a supportive regulatory environment, despite troubles ranging from investor fraud to the US$500 million hack of a Japanese crypto-exchange this year.
"If it wasn't for Mt Gox, I wouldn't have been involved with bitcoin regulation at all," says Mineyuki Fukuda, a former Liberal Democratic Party lawmaker who helped create the country's rules.
After a boom in the popularity of cryptocurrencies, governments from the US to China have proposed tight regulations or outright bans to prevent abuse.
Japan has been particularly hard hit with hackers swiping a total of almost US$1 billion. But the nation's lawmakers have remained firmly supportive.
They're moving to regulate new exchanges, rather than ban them outright. Last week, they took the first step toward legalizing initial coin offerings, or ICOs, a controversial fundraising technique outlawed in places like China and South Korea.
Emboldened by the government's stance, tech and financial firms are stepping up investment.
"Personally I was thinking, OK, they're probably going to take the Chinese approach of 'We're just going to ban this thing and nobody's going to be able to do it again'," says Thomas Glucksmann, a former employee of Mt Gox.
"But they kind of went the opposite way."
Ver, who owns Bitcoin.com, didn't have any of this planned when he came to Japan. He was a millionaire thanks to the same online business that landed him in trouble with authorities in the US.
He said he'd had a Japanese girlfriend once and decided to move to the country in part to find a new one. Karpeles also landed in Japan on a whim, attracted by its culture and anime.
After discovering bitcoin in early 2011, Ver began buying coins on Mt Gox and talking up the prospects for currencies independent of any government.
He organized gatherings for enthusiasts, first at a fruit parlor and then at a bar in Tokyo's Roppongi neighborhood.
Bitcoin Jesus, as he became known, also gave away coins when they were worth about US$1. (A single bitcoin now trades at about US$6,700.) He estimates he handed out more than 10,000 coins.
"That would be worth more than US$50 million dollars today," Ver says.
Ver stayed bullish even after Mt Gox filed for bankruptcy in 2014, sending prices tumbling.
He says the laws Japan implemented last year in the wake of the bankruptcy - regulating crypto exchanges and allowing bitcoin use in retail payments - were more industry-friendly than he expected. But ever a libertarian, he says he'd prefer no rules at all.
"I'm a bit averse to dealing with politicians, regulators and lawmakers," says Ver, who resides in Japan but also holds citizenship in the tax haven of St. Kitts.
"The regulators aren't technologists. They don't know about this."
Those laws are now responsible for an influx of corporate interest. Electronic retailers like Yamada Denki Co. have embraced bitcoin for payments.
Large tech firms including messaging provider Line Corp. are launching crypto exchanges.
And big banks are pouring millions into blockchain startups that promise to disrupt the financial order.
"You've gone from Japan as this inconspicuous crypto hub which happened organically because of the presence of Mt Gox and a handful of crypto evangelists like Roger Ver," says Glucksmann.
"To now very much a top down driven 'Welcome to Japan. We want to be the crypto hub of Asia, if not the world'."
Ver says he can't take full credit for the country's embrace of crypto, but agrees he played a role in the early years.
Karpeles, still on trial for embezzlement charges related to Mt Gox, didn't respond to interview requests.
But reflecting on the past decade, he wrote recently that he's glad he came to Japan.
"I'd guess I lost everyone except for a few close friends," he wrote last week in online posts on Reddit. "I don't regret it, despite all that happened."