In 1978 Mrs Thatcher had a birthday cake shaped as a key to No 10.
Secret papers released after 30 years show how Labour tried to sideline opposition leader Margaret Thatcher on the anniversary of universal suffrage.
Prime Minister James Callaghan ordered "on no account" was she to be allowed in the London Palladium's Royal Box with Princess Margaret in 1978.
He also considered backing out of an exhibition marking 50 years of women's votes because she would be there.
The papers show back-stage manoeuvring ahead of the 1979 general election.
The documents released by the National Archives show how the aversion that Labour ministers already felt towards Mrs Thatcher boiled up in the summer of 1978.
The trigger was the sudden realisation that Mr Callaghan might have to share a platform with her at a London exhibition marking half-a-century of votes for women.
The prime minister's principal private secretary, Ken Stowe, remarked that "we were all asleep" when the project was first aired and at such an event it was "inescapable" that "the leading woman politician of the day is going to get a fair amount of the limelight".
But he warned that any government attempt to write her out of the proceedings would result in what he called "juicy little stories" in the newspapers.
The depth of dislike for Mrs Thatcher was highlighted in a letter to the prime minister from junior environment minister Baroness Birk.
She wrote: "I am sure Mrs Thatcher's public appearances do as much harm to her party as yours do good to ours.
"If you appear together the contrast between your reassuring authority and her shrillness would be striking."
Aides put forward alternatives, aimed at downplaying the event by, for instance, sending a Labour woman minister to speak in his place.
But Mr Callaghan ruled that it should go ahead as planned.
He did however move to keep her out of the public eye at a related event, a royal variety show at the London Palladium, for Princess Margaret.
A handwritten note on the file says: "PM says Mrs T on no account to get into Royal Box."