Scotland has a dirty secret. Many Scots liked Thatcherism. But these people have been written out of history: to listen to the independence debate, or to how Scotland has talked about itself since the early 80s, you might imagine that her governments – with their southern English, sharp-edged, supposedly fundamentally foreign ways – were foisted on Scotland entirely through English votes.

Like so many of the black and white things still said about Thatcherism, it is a convenient myth. In fact, Scottish support was crucial to her coming to power. At the 1979 election, the Conservatives won over 31% of the Scottish vote, an increase of almost a third on the previous election – when they had been led by the much less carnivorous Edward Heath. In 1979, the Tories also won 22 Scottish seats; had these gone to other parties, Thatcher's 44-strong majority would have disappeared entirely.

Four years of abrasive Tory government followed: the decimation of manufacturing, the harsh dogma of monetarism, the beginning of modern British military adventuring with the Falklands war. Did Scots reject it all in disgust? Not exactly: Tory support in Scotland at the 1983 election dropped by just 3% (it fell in England too). At the 1987 election, the Scottish Tory vote slipped another 4%. But then, at the 1992 election – the Conservative victory that ensured many of the Thatcherite changes to Britain would not be reversed – Tartan Toryism revived again, increasing its vote share to 26%: still higher than Heath had managed in 1974.

In 1992, even after 13 years of Tory rule, after the early imposition of the poll tax on Scotland, and countless tin-eared Thatcher trips north of the border, a large minority of Scots approved of what the Tories had done to their country. In a close election, that approval was quietly pivotal for Thatcher's deceptively rightwing successor John Major.

The Tory vote in Scotland did not finally collapse until the 1997 election, when it fell by a third, never to recover. Why did this rejection of Thatcherism – if that's what it was, rather than enthusiasm for the Thatcher-revering Tony Blair – take so long to happen? Speaking to the Tory blogger Iain Dale in 2008 about his country's feelings towards the Thatcher government, SNP leader Alex Salmond said: "We didn't mind the economic side so much." He went on to add: "We didn't like the social [policy] side at all," and to furiously deny that he had given Thatcherism any kind of endorsement. But the first minister also gave an economic prescription for Scotland that might have come from an 80s Tory: "We need a competitive edge, a competitive advantage – get on with it, get things done, speed up decision making, reduce bureaucracy."

The SNP's Thatcherite side lives on in its promises to cut corporation tax and air passenger duty in order, it is claimed, to create a more dynamic country. And Thatcherism lives on in Scotland's economy and society. David Torrance, author of 'We In Scotland': Thatcherism in a Cold Climate, wrote in the Scotsman last year that under her, "North Sea oil boomed in Aberdeen, financial services swelled in Edinburgh … Overall employment levels remained relatively stable, while the labour market diversified, to the benefit of part-time, self-employed and female workers." Three decades later, the richest parts of modern Scotland – the electric-gated oil suburbs of Aberdeenshire; the central Edinburgh streets full of bankers' BMWs – look tellingly like Thatcherism's former heartlands in London and the home counties. Just because people don't – mostly – vote Tory any more, doesn't mean they haven't absorbed some of modern Toryism's free-market assumptions.

In Scotland, as elsewhere in Britain, it is true, her revolution left at least as many losers as winners. But Scotland's final reckoning with Thatcherism has yet to happen. That may not come at the referendum but afterwards, with an SNP administration, whether independent or devolved, having to choose between its contradictory commitments both to low taxes and semi-Scandinavian state spending. That's when we'll find out how many closet Scottish admirers Thatcher still has.