Margaret Thatcher and her Cabinet colleagues had an extraordinary row over the dangers posed to the nation's moral wellbeing by acknowledging the existence of anal sex in the 1980s.

The arrival of the Aids epidemic in Britain had persuaded ministers by 1986 that urgent action was needed to prevent the spread of HIV with an unprecedented public education campaign.

Documents released by the National Archives show that the then health secretary Norman Fowler proposed in February 1986 to publish full-page adverts in national newspapers explaining that unprotected anal intercourse carried one of the highest risks of transmission.

The Prime Minister expressed concern that it risked corrupting public morals.

Annotating a memo describing the campaign, Mrs Thatcher wrote:

Do we have to have the section on risky sex? I should have thought it could do immense harm if young teenagers were to read it?

Mrs Thatcher asked for an investigation into whether the adverts might breach the advertising code as well as the Obscenity Act. When the answer came back that the campaign was legal, she said:

I remain against certain parts of this advertisement. Adverts where every young person will read and learn of practices they never knew about will do harm.