Margaret Thatcher at the Conservative conference in Brighton hours before the IRA bomb. Photograph: John Downing/Getty Images

The 1984 Brighton bomb forced Margaret Thatcher to tear up what would have been the most divisive speech of her premiership, in which she planned to accuse not only militant miners but the entire Labour party of being “the enemy within” and part of an “insurrection” against democracy.

Thatcher’s personal papers reveal that when the IRA bomb exploded in her Brighton hotel, at 2.54am on 12 October 1984, her secretaries were still retyping the final draft of her party conference speech, in which she was to accuse Neil Kinnock of being a “puppet” leader of a Labour party that had been “hijacked” by the “enemies of democracy”.

Reports of Thatcher’s infamous “enemy within” speech, delivered in private to the Conservative backbench 1922 committee the previous July, provoked widespread outrage, because she had appeared to say Britain’s mining communities were as dangerous an enemy as the Argentinian dictator General Galtieri had been over the Falklands.

Her own handwritten notes for that speech , released for the first time by the Margaret Thatcher Foundation on Friday, confirm her intentions: “Since Office. Enemy without – beaten him & resolute strong in defence. Enemy within – Miners’ leaders … Liverpool and some local authorities – just as dangerous … in a way more difficult to fight … just as dangerous to liberty.” And her private office files show that her press secretary, Bernard Ingham, had expected the now notorious phrase to be made public. But his attempt to insist that she had been attacking the “militant minority” rather than the miners as a whole was lost on many.

More of Thatcher’s notes from the speech. Photograph: Margaret Thatcher Archive Trust/PA

Now the draft transcripts of the discarded conference speech reveal that, far from regretting using the phrase “enemy within”, which she had only used previously used in private, the Tory prime minister was quite prepared, in the middle of the bitter 1984-85 miners’ strike, to repeat it publicly – and widen it to include nearly the whole of the Labour movement.

Chris Collins of the Thatcher Foundation said: “It was a speech which would have been remembered as controversial and would have eclipsed the ‘enemy within’ speech – indeed, it was intended to do that.”

The drafts, some of which have been taped back together, show she intended to warn that the country was facing nothing less than “an insurrection” and that “our country is not to be torn apart by an extension of the calculated chaos planned for the mining industry by a handful of trained Marxists and their fellow travellers”.

The opening of the planned speech - part of the Thatcher Papers archive at Churchill College, Cambridge - dispenses with usual conference niceties: “From the dark cloud falls an acid rain that eats into liberty,” it begins. Thatcher was to go on to put Labour’s refusal to condemn the picket-line violence of the militant miners at the very heart of the problem, with influential men prepared to repudiate the ideas of parliamentary democracy and the rule of law.

She was to claim that the Labour party was now the “natural home” of these forces – which was why it was so muted in its condemnation of the violence and its praise of the police or working miners, and yet willing to trumpet the “extreme cause” of Arthur Scargill’s leadership of the National Union of Mineworkers.

“Yet the Labour party in its present form, infiltrated by extremists, riven with factions, still stands upon the stage as the [principal] alternative to the Conservative party in governing Britain. That, Mr Chairman, is the measure of the shadow which has fallen across freedom since we last met,” the speech reads.

The Guardian front page the morning of the Brighton bomb. Photograph: The Guardian

The text of the draft she arrived with in Brighton, written hard on the heels of the previous week’s Labour conference, shows that she intended to claim that Kinnock had vainly tried, in her words, to persuade his party that “the way to gain power was through the ballot box, not through insurrection.

“Mr Kinnock’s own words … show just how far the enemies of democracy have advanced inside the modern Labour party. Mr Kinnock, for all his words – and there is no shortage of those – has been hijacked, first by Mr Scargill, then by the anti-democrats at his own party conference. In name he may be leader. In reality he is a puppet.”

The draft said that the conference, where the police and working miners were hissed and booed, had voted to back breaking the law.

“Several months ago, I used the phrase ‘the enemy within’. I was not referring to the trade unions, or other political parties, or anything of the kind. I was referring to those people who are the enemies of freedom and democracy itself. And in case anyone doubted me, they were there for all to see in Blackpool last week.”

It firmly sought to blame what Thatcher described as “the ultra left”, specifically communists in trade unions and Trotskyists such as the Militant tendency taking over local government. Kinnock was to confront the hard left at the 1985 Labour conference, where he denounced Militant’s record in running Liverpool city council, provoking walkouts.

The former Labour leader said on Thursday night that the unpublished draft was “further proof, if any more be needed, of the degree to which she was determined to politicise the dispute and was deeply engaged in the organisation of detail, not just strategy, while pretending otherwise. Week after week she used to tell me that the dispute was between the miners and the National Coal Board, nothing to do with the government. So she was a serial misleader.”

On the tone of the undelivered version, Lord Kinnock said: “In the end, she might not have used that passage, because people around her would have told her how absurdly counterproductive it would be. All subsequent cabinet paper disclosures have shown she was desperate to make political capital out of the dispute, to the extent of firing off such absurd allegations. I did condemn violence and was never at the beck and call of Scargill.”

The explosion of the IRA Brighton bomb, aimed at the heart of the cabinet, ensured that the attack was never delivered. The speech was hastily rewritten in the Brighton conference centre in the early morning, meaning that Thatcher’s most famous remark on the miners’ strike – “the enemy within” – would be one that she never actually uttered in public.

Collins said it was ironic that the violence of the bomb, which killed five people and left several more, including Norman Tebbit’s wife, Margaret, with permanent disabilities, led to a softening of the speech with the attack on Labour largely written out. “Whatever else the opposition was guilty of, clearly it had no part in this,” said Collins.

Thatcher insisted that the conference had to go on and delivered a far less combative speech. That weekend she received messages from around the world, including from the Queen and the US president, Ronald Reagan. Kinnock wrote to say he was “horrified and outraged at this terrible atrocity”. Michael Foot sent a particularly “warm” letter.

On the Sunday, replying to a letter from former Tory party chairman Lord Thorneycroft, she told him: “This morning at church as the sun came through the stained glass windows, I thought: this is the day I was not meant to see.”