OVER the past seven months the British economy has beaten almost all forecasts. Since the Brexit vote last June, a recession has easily been avoided and job growth remains decent. In one part of the country, however, things look very different. In the year to September Scotland’s GDP grew by 0.7%, while that of the rest of the country grew by 2.4% (see chart). Employment there is falling and wages growing much more slowly than elsewhere.

Scotland’s weak performance is linked to problems in its two most important industries: energy and finance. Those two businesses’ exports have together accounted for up to a third of Scotland’s GDP in the past. Now both are in trouble.

The bad news begins in the North Sea. The drop in the price of Brent crude from $110 a barrel in 2014 to $55 today has hit the oilmen hard. Tax revenues from oil and gas are shared across Britain, so Scotland has not felt much of a fiscal impact. But of the 100,000 or so British oil-and-gas jobs lost since 2014, perhaps a third were in Scotland. Those gigs paid well—at the height of the boom, relatively unskilled folk could command six-figure salaries—so their loss takes a big bite out of consumer spending. The effects are plain to see. In Aberdeen, Europe’s oil capital, hoteliers used to charge almost whatever they liked. No more: the average price of a room has dropped by a third since late 2014. House prices in the city are falling faster than they are anywhere else in Britain. On Union Street, the main shopping drag, vacancies have risen; a nearby steak-and-lobster restaurant, where a wagyu ribeye would set punters back £40 ($50), closed last year. Few people expect to see a return to the days of steak and lobster. With ageing fields and pricey labour, the North Sea is one of the world’s most expensive regions from which to extract oil. At today’s prices, production is barely profitable. With many fields nearly exhausted, big firms are looking elsewhere. In January Royal Dutch Shell and BP both said they would sell some of their North Sea interests.

The troubles in the oil industry are well known. Less noticed is that Scottish financial services are also having a tough time. Wander around the handsome Georgian squares of Edinburgh’s financial district, and nothing looks amiss. Yet since 2014 employment in the industry has dropped by over a tenth (while rising slightly in London). Average pay has declined by 5% in the past year.

Scottish finance is struggling for two reasons. First, argues Owen Kelly of Edinburgh Napier University, it disproportionately comprises mid-range work, such as customer service. Those jobs are vulnerable to automation, which is proceeding apace across the financial-services industry. In March the Royal Bank of Scotland began cutting more than 500 jobs as part of a plan to automate investment advice. Official data suggest that, in just two years, 20% of Scotland’s administrative jobs in financial services have disappeared.

Second, speculation about another independence referendum is hurting the industry. Since the Brexit vote, in which a majority of Scots chose to Remain, the ruling Scottish National Party has accelerated plans for what it calls “indyref2”. Last month a consultation closed on a draft bill for a fresh ballot. Polls suggest that support for independence is not far off 50% (and nationalists point out that in the ultimately unsuccessful campaign of 2014 they substantially outperformed early polls).

This concerns Scottish financial firms much more than Brexit does. The vast bulk of their business takes place in the rest of Britain, not Scotland, points out Graham Campbell of Saracen Fund Managers, based in Edinburgh. Independence might lead to trade barriers at the English border, or different regulations between the two countries, especially if Scotland sought to rejoin the EU, as its government has implied it would. Some firms are making contingency plans. Murray Asset Management, another Edinburgh firm, recently moved its registered office to London.

The jitters seem to be more widely felt. Formation of startups in all industries has fallen sharply since 2013, suggest data from BankSearch, a consultancy. Foreign investors have also taken heed: the number of foreign direct investment projects has dropped by a tenth in two years, while jumping in the rest of the country. Reduced investment will hit productivity growth and hence pay.

Scotland’s changing fiscal architecture could compound these problems. Last April the Scottish government assumed partial control over income tax. Soon it will take almost complete control, and will also get its hands on half of value-added tax (VAT) receipts, among other things. Our calculations suggest that it will thus be responsible for collecting tax equivalent to a third of all public spending in Scotland (the remaining two-thirds will continue to come from Westminster). This has advantages: the freedom to raise or lower taxes will allow the Scottish government to respond more nimbly to local circumstances, and if Scotland booms it will enjoy higher tax receipts. But during downturns its tax take will fall. Scottish public finances have never been more vulnerable.

Which makes the present difficulties all the more serious. Regulations place strict limits on how much the Scottish government can borrow, so if tax receipts are weak it has to economise. In its draft budget for 2017-18 it has already cut local-authority spending, points out Ronald MacDonald of Glasgow University. The fiscal pressure will intensify if employment falls further, cutting into the income-tax take. Consumer spending is also looking shaky, which will trim VAT receipts. While the overall British economy will surely slow as Brexit gets under way, Scotland is in for a very tight squeeze.