Margaret Thatcher was not a Whistler etching. She did not do shades of grey. Nor do most of those who write about about her. She is either the best of Prime Ministers or the worst of Prime Ministers: the woman who saved the country or the woman who destroyed it. No one could claim that she was an insignificant figure. No one doubts that historians yet unborn will be discussing her legacy; that she will continue to ride the storms of controversy, as she did in her prime.

Thirty years ago, that all seemed so unlikely. In those days, even in the Tory party, very few people realised that she was the raw material of political greatness. Shortly after she won the leadership, Rab Butler spoke to Chris Patten. "This, ah, Thatcher woman. We don't have to take her seriously, do we?" It now seems laughable, but back then, he had a point. Ted Heath put her in his Cabinet, as the statutory woman. In three and a half years, she did not outgrow that status. She abolished a lot of grammar schools and free school milk; there were no other achievements. As an Education Secretary, she ranks somewhere between undistinguished and mediocre.

Ted lost two elections: time to go. But who was to take his place? Willie Whitelaw would not run against him. Everyone agreed that Keith Joseph would not do, including Keith Joseph. There was hesitancy. She brought it to an end. Her courage won its reward. Four years later, however, she had still not transformed that courage into unquestioned authority. A much less successful Leader of the Opposition than Tony Blair or David Cameron, she was often patronised in the Commons by Jim Callaghan. Her Shadow Cabinet included several men – Carrington, Gilmour, Joseph, Prior, Pym, Whitelaw – who appeared to be at least her equal in substance.

Download the new Independent Premium app Sharing the full story, not just the headlines

It is one of the more fascinating "what ifs" in counter-factual history: what if Mr Callaghan had called an election in October 1978? Even if Mrs Thatcher had won, she would have had a tiny majority. Could her fledgling government have survived the Winter of Discontent, which would have happened regardless, as Labour's wages policy imploded? But Jim dithered. The Winter of Discontent not only destroyed his chances. It highlighted the failure of an entire, often bi-partisan, approach to economic management. Amid all the wreckage, she alone seemed undaunted. No one else knew what to do. She insisted that she did.

It still seemed perilous, if not indeed lunatic. Here was this unsophisticated, inexperienced woman, prating her irritating certainties and proposing to overthrow the entire post-war settlement. Could this possibly work? Had she any idea what she was doing? If she failed, which seemed almost inevitable, would she not have destroyed the final defences against socialism? That was the way in which many Tories talked during those early months. I know; I was one of them. Thirty years on, there is only one conclusion to be drawn. Thank God the Wets were wrong.

Mrs Thatcher had two qualities which enabled her to withstand everything events threw at her. She was simple-minded and she was lucky. The simplicity was a strength, and there is a delicious paradox. Over the centuries, most Tory leaders have been intellectuals. She is an exception. The least intellectual Leader since Bonar Law, she lacked subtlety, irony, any sense of the complexity of moral judgements or the playfulness of language. Yet she was the first Tory leader to use the word "intellectual" as a term of unqualified approval.

This was of great importance. It is also a tribute to some insufficiently-sung heroes, including Keith Joseph, Ralph Harris, and John Nott, who all helped to persuade her that she was an intellectual. Up until then, she had thought that her political ideas were a distillation of grocer's shop economics from her father, golf-club economics from Denis – and her own housewife economics. She was then told that her common-sense instincts were actually the cutting edge of the new economic movement: that she was right there with Hayek, von Mises and Friedman. This helped to give her the self-confidence she needed to save her country.

But she did not know how to behave like an intellectual. She liked her ideas on parade, not lounging around in armchairs. At meetings of the Tory Philosophy Group, she took notes and rebuked Enoch Powell for being negative. She wanted intellectuals to provide her with ammunition and certainties.

This formidably intelligent un-intellectual had a further advantage. She knew little history. She was surrounded by men who did, but the Ian Gilmours and Chris Pattens were especially proficient in the history of failure and decline. The failure of the Macmillan government, the Home government, the Heath government: the long, melancholy, withdrawing roar of British post-war, post-imperial history. After such knowledge, what forgiveness?

Rather than listen to that sort of tosh, Margaret Thatcher would have preferred to clean the house. To her, history was a straightforward contest between good and evil. There were men like Churchill who had the guts to do their duty. There were the others, including most of the post-war Tory leadership, who did not. She was determined that however many hand-baggings she inflicted along the way, she would do hers.

This did not make it easy to work for her. Most of those who served her would agree on two points: that it was the most exhilarating experience of their working lives, which they would not have missed for the world – and that there were moments when she became so infuriating that they could have cheerfully strangled her. Ronnie Millar, the playwright who wrote speeches for her, put it beautifully. "I love-hate that woman," he would say: "I can't tell you how much I love-hate her." Yet she was always endlessly considerate to those who could not answer back. For nearly 16 years as Opposition Leader and PM, she drove herself relentlessly. Speechwriters, Permanent Secretaries, Cabinet Ministers, foreign heads of government: they all felt the backlash of the stress. Secretaries, drivers, messengers, telephonists: never.

She knew how to use her time. She also knew how to use her good fortune. Although she would never have admitted it, Margaret Thatcher was an immensely lucky politician. As she was also energetic and determined, allowing her a glimmer of luck was like dropping Bradman before he was off the mark. There would not be another chance for a double century. Jim Callaghan's election timing was followed by Michael Foot defeating Denis Healey for the Labour Leadership. Dear old Footy: a delightful litterateur, a useless politician. He was worth a 10-point start to the Tories, or the SDP.

That said, there were circumstances in which Michael Foot might have come close to Downing Street, and in which Mrs Thatcher would have been obliged to resign. If General Galtieri had accepted the Peruvian peace proposals, there could have been no triumphant recapture of the Falklands. The Task Force would have had to crawl home; Margaret Thatcher would have had to crawl out of No 10.

Before the Falklands, the Tories had started to recover in the polls and even if there had been no war, that would have continued, thanks to Footy. But diplomatic intervention turned the Falklands into a damned close-run thing and with it, the future of Thatcherism. Although her Tory successor might have been able to hold off Mr Foot, he would have abandoned her agenda.

As it was, Churchillian deeds in the South Atlantic gave her the strength to fight a crucial domestic campaign. There too, she owed a lot to her opponent's incompetence. If Arthur Scargill had not been besotted by revolutionary fantasies, he would have agreed to the Nacods' peace terms. If so, it is not clear whether the government could have won that strike.

It was a victory with enduring consequences. As Mr Scargill's beaten army straggled back to work, the idea that the unions should be entitled to a virtual joint authority with government ceased to be a threat and passed into history. After six storm-tossed years, Mrs Thatcher had won a distinction which none of her predecessors had attained. Her doctrines had earned a permanent place in the language. Thatcherism had ceased to be an embattled creed associated with a transient politician. It had become a part of the British political firmament.

Domestic Thatcherism is easy to define, for there are only six core principles: four negative, one positive and one historic. Thatcherism meant the end of nationalised industries, supra-legal trade union power, chronic inflation, and confiscatory rates of income tax. It also meant that all economic activity should take place within a free market. Finally, it meant the end of British socialism as a governing ethos. There might still be Labour governments, but they would not attempt to re-order society or recast human nature. Those were her aims and values. The extent to which she achieved them entitles her to be regarded as easily our greatest peace-time Premier.

But Thatcherism was never a purely domestic phenomenon. Throughout much of the world, she is remembered – in Eastern Europe, revered – as the statesman who helped Ronald Reagan to win the Cold War. Partly because new dangers now dominate the geopolitical landscape, that victory may appear diminished, as if it had been easy and inevitable. That was not how it seemed in 1979.

Attempts to extend Thatcherism were much less successful. Take Europe. There, it is clear what Thatcherism ought to mean: a common market, reinforced by political co-operation, but with any loss of sovereignty confined to the minimum necessary to ensure free trade. There should be no wasteful bureaucracy, and above all no question of a super-state. By the end of her 11 years in office, there had been significant transfers of sovereignty. The single market was still full of imperfections, the bureaucracy more wasteful than ever, and the super-state was still on the agenda. Mrs Thatcher's European policy was unclear and ineffective. It was certainly not Thatcherite.

The same applies in other key areas. On education her government replicated her weakness as Education Secretary. There is no reason to believe that the average state-school child received a better education in 1990 than in 1979. This was symptomatic of a broader problem, one which also defeated Tony Blair and which David Cameron will inherit. Mrs Thatcher never learned how to use the power of the state to obtain both value for money and desirable social objectives.

Here, she had the defects of her qualities, for it would have helped if she had been rather more intellectual. Thatcherism had no theory of the state. When an election was imminent, she would fill the gap by claiming that the NHS was safe with her. Otherwise, and in private, she came perilously close to the position which Carlyle caricatured as anarchy plus the constable. Defence and the police were vital. All the rest of the state was a mere unprivatisable residuum, which had to be preserved for electoral reasons but which would never be much good.

In this, she also displayed the narrowness of her imaginative sympathies. In Margaret Thatcher's world, you worked hard. In so doing, you reaped the harvest of upward social mobility: home ownership, share ownership, a healthy pension, private healthcare and private education. If she had been honest, Mrs Thatcher would have said that apart from a few bizarre, incomprehensible Lefties, it was a mark of economic failure to use state schools and not have health insurance. Although she has a partial excuse for not doing more on education, in that there were bigger dragons to slay, there is no evidence that she would ever have got the education system in a firm Thatcherite grip.

Her lack of imaginative sympathy had another important manifestation. Because of it, the Billy Elliott version of Thatcherism, though grotesquely exaggerated, does not lose all contact with truth. She did not set out to destroy vibrant working-class communities and replace them with the listlessness of hereditary unemployment. But again, if she had revealed her innermost thoughts, they would have included the belief that most of the unemployed have only themselves to blame: that those who really want work will always find it.

It must also be remembered that most of the industries which Mrs Thatcher is accused of destroying were already in the gun-sights of globalisation. They could not have continued to provide those who worked in them with a first-world standard of living. This country had impoverished itself by subsidising sunset industries. Eventually, that would have had to stop. Mrs Thatcher only accelerated the process.

Acceleration brings us to Big Bang, and the Left's attempt to blame her for the recent banking crisis. That is nonsense. The Big Bang legislation strengthened the regulatory system for London-based banks. Mrs Thatcher cannot be blamed for Gordon Brown's decision to weaken it.

Nor was she responsible for excesses which she would never have condoned. Her electoral successes probably did encourage the masters of the universe to disregard the Gods of the Copy-Book Headings, but she would never have forgotten her Kipling. Apart from business's working capital and mortgages – at well short of 100 per cent – she did not approve of borrowing.

One morning, her daughter Carol appeared in a smart new coat. She was about to go skiing. Her mother congratulated her on being such a good manager. "Well, Mum, our flexible friend has his uses." The ensuing maternal explosion was well up the Richter scale. A bank once sent Mrs T a credit card. Her response: "I cut it up", said with such revulsion that she might have been talking about toxic waste. In her view, she was.

Then there is that much abused remark, "There is no such thing as society". Of course, she did not mean it. She was simply rebutting the defence-lawyer's line that crime was all society's fault, which had been recycled by so many criminals in an attempt to evade the blame for their misdeeds. It is true that social breakdown accelerated in the 1980s. But that was hardly her fault. It was caused by the disintegration of the family, which has exacerbated every social problem. It is also true that she did not have a solution. Who does?

Although she was passionate about freedom, that did not make her a libertarian. She thought people ought to be free, to do what they ought to do. Braced for some short-pitched bowling, a friend of mine once suggested that cannabis should be legalised. She was not even willing to follow the intellectual argument. "That would be like legalising theft," she hissed at him. He gave up. As so many did, in the face of that awesome personality. Those days are over. She is now a lioness in winter. But there are still flashes of the old magnetism, which those who knew her will never forget.

It was a remarkable career. Joan of Arc, Elizabeth I: Margaret Thatcher is in that league. Cometh the hour, cometh the woman. At a moment when many wise men were convinced that Britain was in irreversible decline, she raised her sword aloft and proved them wrong. Now and in the long future, she has earned the eternal gratitude of everyone who loves this country.