WHEN the British economy catches a cold, Scotland often goes down with the flu. During the recession that followed the financial crisis job losses were especially severe there. But these days Scotland is surprisingly hale. Its unemployment rate stands at 7.1%, below the British average of 7.8%. And the rate of private-sector job creation north of the border over the last three years is ahead of all other parts of Britain apart from London (see chart). Has Alex Salmond, the first minister of Scotland’s devolved government, found a magic jobs formula?

Despite Mr Salmond’s pro-public sector and anti-austerity rhetoric, the explanation is not that bureaucrats are being protected. As a proportion of the entire workforce, more public-sector jobs have been lost in Scotland over the past few years than in Britain as a whole.

Partly, the economy is simply rebounding from a tough recession. But Donald MacRae, the Bank of Scotland’s chief economist, thinks Mr Salmond deserves credit for helping the construction trade by accelerating capital spending in 2008-10. Although the outlay was initially a modest £323m ($490m), it was followed by £2.5 billion of private money for road, rail, school, hospital and house building work. Together with prestige projects such as venues for the 2014 Commonwealth games in Glasgow, this largely explains why Scotland’s construction workforce has expanded by 10% in the last three years as it has shrunk by 3% elsewhere.

Scotland also benefits from two industries—oil and gas production and food and drink making—which have grown steadily through the slump. They are big employers: about 200,000 Scots work at extracting the North Sea’s diminishing riches, whereas distilling whisky, netting salmon and harvesting other goodies generates about 120,000 jobs, adding up to about an eighth of the workforce.

Cliff Lockyer of the Fraser of Allander Institute at Strathclyde University, which produces economic forecasts for Scotland, cautions that job quality is declining. Self-employment and part-time job growth have been especially strong, as elsewhere in Britain. This trend, which helps explain why the jobs increase has outpaced output, is likely to continue, thinks PricewaterhouseCoopers. Still, the accountancy firm expects Scotland to add more jobs than Wales, Northern Ireland or the north of England over the next five years.

Westminster politicians argue that Scottish independence would imperil its economy. On July 2nd Vince Cable, the business secretary, detailed all sorts of likely regulatory and tax headaches which, he says, would create a lot of uncertainty and cost jobs. Yet buried within the report is some research by Ernst & Young which points to another reason for Scottish success in job creation. In 2012, the accountants found, Scotland attracted 76 inward investment projects expected to create 4,867 jobs, 16.1% of the British total. Just 8% of Britons live in Scotland.

Mr Cable says this is because foreign investors can gain unimpeded access to the British single market. Mr Salmond counters that it suggests investors do not fear independence. Perhaps more likely, it may suggest that companies have been reading opinion polls, which stubbornly show that independence will be defeated next year by a two-to-one margin.