When a SWAT team appeared at Pavel Durov's door in St. Petersburg, he started thinking about his future in Russia.
He was home alone, and he peered at them through a monitor.
"They had guns and they looked very serious," said Mr. Durov, once Russia's biggest celebrity entrepreneur. "They seemed to want to break the door."
Not long ago, Mr. Durov, 30, was seen as Russia's Mark Zuckerberg. He founded a social network, VKontakte, which is more popular in Russia than Facebook, and made a splash by publicly offering Edward Snowden a job.
Then the Kremlin tightened its grip over the Internet and President Vladimir V. Putin's allies took control of VKontakte. Mr. Durov eventually sold his remaining stake for millions and fled Russia in April, after resisting government pressure to release the data of Ukrainian protest leaders.
Mr. Durov, known for his subversive wit and an all-black wardrobe that evokes Neo from the "Matrix" movies, is now a little-seen nomad, moving from country to country every few weeks with a small band of computer programmers. One day he is in Paris, another in Singapore.
VKontakte, a social network, is more popular in Russia than Facebook. Credit Pavel Golovkin/Associated Press
"Me myself, I'm not a big fan of the idea of countries," Mr. Durov said, wearing a custom-made cross between a hoodie and a sport coat.
When he arrived with little warning in London for his first interview outside cyberspace since leaving Russia, he was en route to San Francisco, where he appeared at a technology conference on Tuesday. He is surfacing to showcase his new messaging app, Telegram, for people craving privacy and security.
His odyssey reflects the changing nature of the Internet in Russia.
Read MoreTech groups aid terror, UK spy boss says
The Internet was once seen as a way to diversify Russia's economy beyond oil. When VKontakte started in 2006, Mr. Durov says, he envisioned his country as a tax-free and libertarian utopia for technologists.
"The best thing about Russia at that time was the Internet sphere was completely not regulated," he said. "In some ways, it was more liberal than the United States."
Now the Internet is viewed with suspicion by Mr. Putin, who has called it a "C.I.A. project" and has taken steps to insulate Russia from the rest of the digital world. One leading Russian activist recently said the government was on a "campaign to shut down the Internet."