WHEN Estonia regained its independence in 1991, after the collapse of the Soviet Union, less than half its population had a telephone line and its only independent link to the outside world was a Finnish mobile phone concealed in the foreign minister's garden. Two decades later, it is a world leader in technology. Estonian geeks developed the code behind Skype and Kazaa (an early file-sharing network). In 2007 it became the first country to allow online voting in a general election. It has among the world’s zippiest broadband speeds and holds the record for start-ups per person. Its 1.3m citizens pay for parking spaces with their mobile phones and have their health records stored in the digital cloud. Filing an annual tax return online, as 95% of Estonians do, takes about five minutes. How did the smallest Baltic state develop such a strong tech culture? The foundation was laid in 1992 when Mart Laar, Estonia’s prime minister at the time, defibrillated the flat-lining economy. In less than two years his young government (average age: 35) gave Estonia a flat income-tax, free trade, sound money and privatisation. New businesses could be registered smoothly and without delays, an important spur for geeks lying in wait. Feeble infrastructure, a legacy of the Soviet era, meant that the political class began with a clean sheet. When Finland decided to upgrade to digital phone connections, it offered its archaic 1970s analogue telephone-exchange to Estonia for free. Estonia declined the proposal and built a digital system of its own. Similarly, the country went from having no land registry to creating a paperless one. “We just skipped certain things…Mosaic [the first popular web browser] had just come out and everyone was on a level playing field,” recalls Toomas Hendrik Ilves, the president. Not saddled with legacy technology, the country's young ministers put their faith in the internet.

A nationwide project to equip classrooms with computers followed and by 1998 all schools were online. In 2000, when the government declared internet access to be a human right, the web spread into the boondocks. Free Wi-Fi became commonplace. Rubber stamps, carbon paper and long queues gave way to “e-government”. The private sector followed: the sale of Skype to eBay in 2005, for $2.6 billion, created a new class of Estonian investors, who made tens of millions of euros from their shareholdings—and have been putting their experience, and their windfalls, to good use. Today Tehnopol, a business hub in Tallinn, the perky capital, houses more than 150 tech companies. Given the country’s tiny domestic market, start-ups have been forced to think global, says Taavet Hinrikus, Skype’s first employee and co-founder of TransferWise, a peer-to-peer money-transfer service whose customers are spread across Europe and America. According to the World Bank, over 14,000 new companies registered in Estonia in 2011, 40% more than during the same period in 2008. High-tech industries now account for about 15% of GDP.

How can other countries—that lack Estonia's small size and its clean sheet—follow its example? “It’s sort of obnoxious to say, ‘Do what we did’,” says Mr Ilves. But he submits that Estonia’s success is not so much about ditching legacy technology as it is about shedding “legacy thinking”. Replicating a paper-based tax-filing procedure on a computer, for instance, is no good; having such forms pre-filled so that the taxpayer has only to check the calculations has made the system a success. Education is important, too: last year, in a public-private partnership, a programme called ProgeTiiger (“Programming Tiger”) was announced, to teach five-year-olds the basics of coding. “In the 80s every boy in high-school wanted to be a rock star,” says Mr Hinrikus. “Now everybody in high-school wants to be an entrepreneur.”

Correction: An earlier version of this article stated that Estonian coders helped develop the code for Hotmail. This is incorrect. It was amended on August 5th 2013.