In the first ballot, she cleared one hurdle - she won the votes of a majority of Tory MPs - but failed to clear the second hurdle, the requirement to beat Michael Heseltine by 56 votes. Required to win 187 votes, she won 204, but Mr Heseltine was 52 votes behind on 152, with 16 abstentions.
She was just four votes short of outright victory - if only two Heseltine supporters had been persuaded to vote for her, she would have held on. She had decided to go to Paris for a European summit meeting, a decision widely seen as a mistake, and came down the steps of the British Embassy in front of the cameras to insist that she would fight on in the second round.
After famously repeating "I fight on, I fight to win" when she returned to Downing Street, she withdrew from the contest two days later, allowing members of the Cabinet to enter the race.
For the second ballot, John Major and Douglas Hurd joined the contest. Mr Major fell two votes short of the required majority, gaining 185 votes, with Mr Heseltine on 131 and Mr Hurd on 56. Although there was no explicit provision in the rules for them to do so, Mr Major's rivals withdrew from the election.
There was a leadership election in 1989, when Sir Anthony Meyer won 33 votes against Mrs Thatcher, with 27 abstentions. After that contest, which opened the first chink in her armour of invincibility, the rules were also changed, to require the names of the proposer and seconder to be made public.
Baroness Thatcher, however, had been the beneficiary of the Tory party's rules when she boldly stood against the previous incumbent leader, Edward Heath, in 1975. Willie Whitelaw held back from entering the first ballot out of loyalty to Mr Heath, and saw Mrs Thatcher win 130 votes, Mr Heath 119 and Hugh Fraser 16, although she failed to win a majority.
Mr Heath resigned, and in the second round Mrs Thatcher won fewer votes, 110, but well ahead of Mr Whitelaw's 79, with Sir Geoffrey Howe, Jim Prior and John Peyton bringing up the rear. All four men withdrew from the contest.Reuse content