Senior civil servants repeatedly warned Margaret Thatcher about the risks of giving Jimmy Savile a knighthood in the 1980s, one describing the broadcaster as a "strange and complex man".
Newly released documents show the ex-prime minister lobbied officials for recognition of Savile's charity work.
But mandarins rebuffed her requests, citing Savile's "manner of life" and fears he might exploit the honour.
Savile, a friend of the former PM, was ultimately knighted in 1990.
The previously secret documents were obtained by the Sun newspaper following a Freedom of Information request.
The Cabinet Office said there was no indication in them that the prime minister or any officials knew about the allegations of sexual abuse and paedophilia against Savile - which emerged in full after his death in 2011.
The heavily redacted papers show that Lady Thatcher first wrote to Sir Robert Armstrong, the most senior civil servant in the country at the time and chair of the honours committee, about the issue of a knighthood for Savile in 1983.
Sir Robert vetoed the idea, saying it was too soon after "unfortunate revelations" in which the entertainer had boasted to the media of having sex with women he met while running charity marathons.
The prime minister raised the matter again just months later but Sir Robert said "lurid details" were unlikely to be have been forgotten and it "would be best if Mr Savile were to wait a little longer".
"We remain worried," he added. "Fears have been expressed that Mr Savile might not be able to refrain from exploiting a knighthood in a way which brought the honours system into disrepute."
After further requests were also turned down, the prime minister's private secretary Nigel Wicks wrote to Sir Robert in 1986 saying that she was "most disappointed that Mr Savile's name has not been recommended".
He added: "She [Thatcher] wonders how many more times his name is to be pushed aside, especially in view of all the great work he had done for Stoke Mandeville [hospital]."
'Manner of life'
At the time, the government was leading a high-profile promotional campaign warning about the dangers of Aids and Sir Robert wrote back stating that Savile's acknowledged "sexual promiscuity" should not be encouraged.
"The case of Jimmy Savile is difficult. Mr Savile is a strange and complex man. He deserves high praise for the lead he offers in giving quiet background help to the sick. But he has made no attempt to deny the accounts in the press about his private life."
Sir Robert's successor, Sir Robin Butler, refused another request from No 10 in 1987, suggesting that to honour Savile would "not benefit the honours system in the eyes of the public".
He wrote: "My committee and I still fear that his manner of life - on his own confession - has been such that a high award for him would be an unhelpful signal when we are still grappling with an Aids problem which threatens to intensify."
The documents released cover all correspondence between ministers and civil servants on the issue.
They do not shed any light on why, after repeated refusals, Savile was finally awarded a knighthood in 1990 - weeks after Lady Thatcher stood down as PM.
The Cabinet Office initially refused the FOI request, citing concerns about the potential impact of publication on continuing investigations into alleged abuse by Savile at hospitals, care homes and on BBC premises.
The Sun appealed against the decision and the Information Commissioner ruled that there was a "compelling public interest" to release the files.
A Cabinet Office spokesman said: "There is no indication in the papers that anything was known then about the allegations that have subsequently come to light about Jimmy Savile. The honours process was followed in accordance with the system at the time."
A report earlier this year detailed 214 crimes recorded against Savile across 28 police force areas spanning several decades.
More than 90 people - who are among 450 alleged victims of abuse - are pursuing legal action against the broadcaster's estate and his former employers in the wake of the revelations.
Previously released correspondence showed that Savile wrote to Lady Thatcher in 1980 and she subsequently invited him to Chequers. The PM regularly attended New Year's Eve parties thrown by the broadcaster.
Savile raised £30m for good causes and was awarded an OBE in 1971.