Margaret Thatcher was the first woman to rule rather than merely reign over the British state since Elizabeth I in 1603. Though she lacked the great queen's personal popularity and defter political skills, Thatcher's sheer willpower and courage sustained her ascendancy over male rivals for a turbulent 11½ years. It was the longest premiership since 1812-27 and the most formidable since Churchill's in his wartime prime.

More than the exercise of political power at a time when Britain's fortunes had reached a postwar low in the winter of industrial discontent of 1978-79, Thatcherism changed the way Britons viewed politics and economics, as well as the way the country was regarded around the world. The "Iron Lady" was more admired abroad than at home, where even many Conservative voters recoiled from her apparent lack of compassion for those whose lives and careers were disrupted by her policies.

Her frequent assertion that "there is no alternative" to the economic medicine she administered to a reluctant country is disputed to this day.

Thatcher's outlook had been formed by her modest background, where families lived within their means, worked hard and did not resort to credit. Many voters could identify with it – and with her. In contrast to the grandees who had long dominated the party, she, like Edward Heath before her and John Major later, was a child of the respectable working class, a grocer's daughter, born above the Grantham shop. Sheer hard work and the austere, high-minded influence of her father, Alfred Roberts, took her to Oxford, where she read chemistry and caught the eye of Tory talent-spotters. She was a parliamentary candidate in Kent aged 23.

She married Denis Thatcher, a party activist, rugby referee and divorced businessman of robust rightwing views, in 1951. He funded his wife's switch to the law and smoothed her route to Westminster, as the MP for safe Finchley in 1959, by which time she was the mother of twins. Their intensely loyal marriage remained the sheet anchor of her hard-driven life until the death of Denis – by now a baronet – in 2003.

Far shrewder than his boozy Private Eye image suggested, he would wait up for his wife in the Downing Street flat, offering her late-night sympathy and a large scotch as she kicked off her shoes and sounded off.

In her determination to reverse what she saw as the ruling liberal elite's fatalistic acceptance of "managed decline" in the home of modern liberty, Thatcher overthrew much of the Attlee government's welfare state – the NHS alone defeated her – and reversed widespread nationalisation, including selling off local authority housing stock in vast quantities. A new process, which became known as "privatisation", was copied around the world.

Under Geoffrey Howe, her loyal first chancellor, out too went interventionist Keynesian economic policies, such as macroeconomic demand management, fixed exchange rates and high levels of personal taxation that included a notional 83% top rate inherited from Labour. It took until the late 1980s for Howe's successor, Nigel Lawson, to get that rate down to 40%. Meanwhile, VAT, paid by all consumers, was almost doubled to 15%.

In place of the flagging social democratic settlement came a high-risk, deregulated, market-orientated system in which the poverty gap widened rapidly and "loadsamoney" rewards at the top rocketed in ways frowned upon in Europe and Japan. With "big bang" deregulation of the City in 1986 paralleling developments in Ronald Reagan's United States, the path was open to the financial crisis that engulfed Anglo-Saxon capitalism in 2007.

In the process, Thatcher also took on the trade unions, most conspicuously the militant miners. Their defeat in the 1984-85 strike reversed the NUM's victory that toppled the government of Ted Heath, in which she had served from 1970-74. Union powers, including wildcat strikes and the closed shop, were sharply curtailed in ways Labour did not reverse after 1997. Most deep mines in Britain closed.

Thatcher handed out similar medicine to Argentinian generals who took her ill-judged defence cuts of 1981-82 as their cue to seize the long-disputed Falkland Islands. A 40,000-strong British task force sailed 8,000 miles into a South Atlantic winter and retook the islands after US-led diplomacy failed to find a compromise. Both reckless and brave, it consolidated Thatcher's reputation as a politician who meant what she said: "You turn if you want to; the lady's not for turning."

In fact she was often beset by doubts and hesitation, and until her final years in power more than capable of burying her prejudices in the face of hard facts on the ground. As such, she faced down the IRA hunger strike at the Maze prison, which saw the deaths of Bobby Sands and nine other prisoners, yet remained prepared to be flexible when the need arose.

The IRA's bombing campaign in Britain culminated in an explosion in the Grand hotel in Brighton at 2.45am during the Conservative conference in October 1984. It was meant to murder Thatcher – she survived because she was still working at the time – and killed four people, including one MP, Anthony Berry. Next day, Thatcher delivered her conference speech largely unchanged. But a year later she signed the Anglo-Irish agreement that allowed the Dublin government a role in the affairs of Northern Ireland, then in its second decade of low-intensity warfare.

Similar pragmatism was evident in her 1984 agreement with Beijing to return Hong Kong to China when Britain's 99-year lease expired in 1997, her signing of the federalising European Single Act (1986) despite her growing Euroscepticism and her willingness to promote Mikhail Gorbachev, the Soviet Union's reforming general secretary after 1985. He was a man she "could do business with", she told the world. The US, under her friend Reagan, president from 1981 to 1989, followed her lead. Both were convinced cold warriors, but sought to encourage Gorbachev's policy of perestroika – openness. The fall of the Berlin Wall in 1989, which led to the collapse of the Soviet bloc and the USSR itself, was claimed as a western triumph, but centrifugal forces were already hard at work inside the Soviet camp.

By the time the triple election winner was forced from office by her own party, as overmighty and out of touch, in November 1990, her face and voice were known around the world. It was not what colleagues would have predicted when Harold Macmillan first appointed her junior pensions minister in 1961. This was notoriously a grind of a job, suitable for her workaholic talents, the whips doubtless thought.

But Thatcher gradually developed more flair and more ideas of her own. As education secretary, the only woman in Heath's cabinet, she cut school milk for 11-year-olds rather than the school budget and earned her first nickname, "Thatcher the milk snatcher".

She learned to accept the inevitability of unpopularity. More importantly, she saw Heath back away from what would later be seen as Thatcherite free market policies, as unemployment passed 1 million. Subsidies, nationalisation – even that of Rolls-Royce in 1971 – and a reasoned approach to the unions did not work, she concluded. Disillusioned she was, but she did not resign, as she fell under the influence of philosophers such as Friedrich Hayek, and of Milton Friedman, the economic high priest of monetarism, and of tight monetary policy as the key to containing the growing scourge of inflation. When Heath lost two general elections to Labour's Harold Wilson in 1974, and Thatcher's intellectual mentor, Sir Keith Joseph, proved too frail to run, she picked up the gauntlet.

In a campaign where expectations were brilliantly manipulated by Airey Neave, the ex-MI6 MP later to be murdered by Irish terrorists, she beat Heath and forced him out in February 1975. Male colleagues, led by Willie Whitelaw, had assumed she was their stalking horse. She beat them all. Equally significantly, she took advice on how to neutralise her negative image with many voters. Out went the hats, down came her voice into something huskier. Thatcher's sex appeal, rarely remarked upon, was tangible and became one of her weapons.

Over the next decade she slowly reshaped her cabinet and party to her own liking, promoting proteges, and sacking or moving fainthearts and One Nation "wets" who questioned her divisive policies. "Is he one of us?" became a stock Thatcher question, asked of impartial civil servants and even would-be bishops. Her critics retaliated in kind. In a rare discourtesy, her old university refused her an honorary degree.

Luck was a commodity Thatcher purported to despise. But she had her share, not least the priceless political asset – as predicted by Jim Callaghan, the man she drove from No 10 in 1979 – that whoever won that election would inherit the arrival onshore of North Sea oil. The black gold proved a miracle that would ease Britain's notorious balance of payments problems and finance the huge cost of mass unemployment and economic restructuring caused by the collapse of old, inefficient industries. With the rise of Asia, all western states faced such problems.

Thatcher's critics protested that her aggressively monetarist policies damaged British manufacturing more than it need have done.

She was also lucky in her opponents. The miners' leader, Arthur Scargill, was a vain and often foolish strategist. So was General Leopoldo Galtieri, the Argentinian president who launched his Falklands invasion in the winter.

Jacques Delors, the fierce French socialist whom she came to see as embodying the ambitions of Brussels – "the Belgian empire" in Thatcher-speak – to destroy British sovereignty, was also a good whipping boy.

Most important was her good luck with events in domestic politics, whichhelped Thatcher, deeply unpopular as recession and inflation worsened in 1981, survive early challenges. Michael Foot succeeded the wily Callaghan as Labour leader, triggering the breakaway from Labour of the "Gang of Four" who formed the SDP. Its leader, Roy Jenkins, won the Hillhead byelection promising to "break the mould'' of British politics, just days before the Falklands crisis broke it in quite a different fashion.

Thatcher emerged from the recapture of Port Stanley and the 1983 election with a majority of 144, Labour almost beaten into third place in the popular vote but well ahead of the SDP-Liberal alliance in seats. Neil Kinnock succeeded Foot and began the long modernisation that culminated in Tony Blair's three victories of 1997-2005.

But Kinnock was never comfortable dealing with an aggressive older woman and lacked both her experience and her command of detail. Thatcher held him at bay, crucially so when he failed to land the killer blow that might have ended her premiership in the 1986 Commons debate over Westland. That followed Michael Heseltine's resignation as defence secretary over the fate of a Yeovil-based helicopter company: should it be merged into Europe or US partnership? Thatcher was mixed up in leaks and skulduggery, but escaped, damaged but still in charge.

In the longer term, Westland did bring her down by making Heseltine an implacable foe, stalking her for the leadership. She won the 1987 election with a smaller 100-seat majority, off the back of what proved to be Lawson's unsustainable boom. But tensions and internal contradictions were mounting.

Norman Tebbit, still suffering from the Brighton bomb wounds that crippled his wife, quit the cabinet. Nicholas Ridley, her ideological soulmate, was forced to resign for indiscreet remarks about German domination. Lawson sought to steady the pound by secretly making sterling shadow the German mark. He and Howe wanted a commitment in principle to take the pound into the embryonic single currency, known as the Exchange Rate Mechanism or ERM, something she resisted until a showdown at the European Madrid summit of June 1989.

In November that year, enraged by her reappointment of the economist Alan Walters to shadow him, Lawson walked out of the cabinet. Major, fast emerging as the latest of her would-be successors and proteges, became chancellor. Howe, so long her loyal lieutenant – author of the 1981 budget that slashed spending in a recession – was sidelined and humiliated.

All the while , Thatcher's nemesis was creeping up on her in the shape of the poll tax. The "community charge" represented her ambitious plan to replace unpopular household rates with a headcount tax that even council tenants would pay: it would dampen their enthusiasm for services paid for by others, she reasoned.

Ideologues, by now firmly in the ascendant, encouraged her to pilot the scheme in Scotland, which had stubbornly resisted both her analysis and English nationalist tone, then to introduce it in one fell swoop south of the border.

More unpopular even than water privatisation, the poll tax prompted riots in Trafalgar Square. There had been riots before in Brixton and Liverpool, triggered by unemployment and deprivation in the early 80s, but the rioters now were expressing doubts shared by mainstream voters.

A further sign of Thatcher losing her grip came when, as a frequent defender of the apartheid regime in South Africa, she dismissed Nelson Mandela as a "terrorist'' not long before he emerged from prison to become the hero of the peaceful transition to majority rule.

With Labour ahead in the polls for more than a year, MPs began to feel restless. In November 1989 an obscure backbencher called Anthony Meyer ran as a stalking horse against her, winning 33 votes and 27 abstentions.

Wounded, Thatcher fought on, ever more dramatic in her pronouncements – "We are a grandmother" – and even in her choice of evening dress.

The final trigger was not the poll tax, but Europe. Major persuaded her to join the ERM in return for an interest rate cut in October 1990. Days later she said "no, no, no" to the suggestion that she might eventually join a full single currency. The long-suffering Howe resigned and surprised everyone – including himself – with a devastating resignation speech.

Heseltine launched his long-awaited challenge. Thatcher beat it off, but not convincingly. Faced with the prospect of serving Hezza, the cabinet told her to her face she should consider stepping down and backing someone who could beat him. She did – and backed Major over Douglas Hurd, her foreign secretary. When Major won and she left Downing Street, photographers captured a rare tear.

The moment was brief, and Major inevitably proved a disappointment to such a dominant predecessor, for whose self-certainty nostalgia grew among Tory activists. The treacherous manner of her overthrow rankled, fuelling a civil war within the party that raged intermittently for 15 years.

Thatcher, who had left office just as the first Gulf war of 1990-91 was brewing, could not bear to remain silent when her words – and two volumes of memoirs – still commanded such attention. She remained a political player, often a disruptive one, on the world and domestic stages for a decade until illness forced her to retire to a quiet private life she had abandoned 50 years before.