Staff at St James’s Palace could hear Jimmy Savile approaching long before they saw him. The jangling of his gold chains and a trailing cloud of cigar smoke announced his arrival.

Just as with the psychiatric hospitals and prisons where he preyed on the vulnerable, the serial paedophile also had a licence to roam in the Prince of Wales’s London base.

After inveigling himself into Charles’s life as a mentor and adviser, Savile was granted unprecedented access across all the royal palaces upstairs and downstairs.

Monster: Saville greets Diana, the Princess of Wales, and the Queen Mother in 1984. Savile was a regular at the royal Palaces after impressing Prince Charles and getting involved in his life - often as an advisor

Unrivalled access: Jimmy Savile meets Prince Charles in 2007 - before his atrocious crimes came to light

The DJ was not just at ease with the Queen’s family, but every bit at home with her servants, too.

‘He was in and out of Buckingham Palace,’ recalls a footman. ‘He would often ask if there was any gossip about the royals, and when you look back, maybe he was building up information which would be useful to him if he ever needed leverage. Lots of people were taken in by his fame, which he used to get people to open up to him. I never heard tales of any sexual abuse, but it was perfectly normal to see him with an arm round the young housemaids and other female servants.

‘We were all taken in by him, and thinking back on it now is frightening.’

Indeed it is. This week an uncomfortable spotlight has been shone on those royal links Savile so assiduously cultivated, thanks to the devastating new play, An Audience With Jimmy Savile, in which the broadcaster is chillingly brought to life by the impressionist Alistair McGowan.

The play chooses to highlight the connections between Savile and Charles, and the way the Prince was deluded by the TV presenter’s phoney man-of-the-people bonhomie.

But Savile did not confine himself to one royal. Prince Andrew was called on to help in an episode of Jim’ll Fix It when an eight-year-old girl asked to visit a warship.

The Naval officer Prince was her host on his minehunter, HMS Cottesmore. Princess Anne was similarly obliging on another episode of the Saturday night programme, while Prince Philip was leant on to help a fundraising drive for the National Spinal Injuries Centre at Stoke Mandeville hospital in Buckinghamshire.

Savile was so close to Charles, both pictured with Frank Bruno in 1998, that not only did he also sacked a senior figure in one of the Royal households because the Prince didn’t have the stomach to do it himself

Savile persuaded the Duke of Edinburgh’s office to send a letter signed by Philip, thanking a millionaire businessman for offering his services to the unit, even though the help had not yet been secured. The letter sealed the deal.

No royal was safe from his sinister embrace.

Even the Queen couldn’t resist his charm — or so he liked to claim — telling one interviewer: ‘She thinks I’m odd.’ Savile, of course, meant odd in an amusing way, but perhaps the Queen was simply being perceptive.

Quite how much she knew of his traipsing around with her domestic staff is not clear. But on one occasion in the late 1980s, he turned up at a drunken Christmas party where apparently punches were thrown.

It didn’t involve Savile, but he later went to bizarre lengths to deny he had been there, threatening a journalist with violence if he dared report it. However, it was the patronage of Prince Charles which was to provide him with his passport to the royal household, and to weasel his way into the circle of one royal after another.

Prince Philip, pictured with Jimmy Savile The royal was leant on to help a fundraising drive for the National Spinal Injuries Centre at Stoke Mandeville hospital - where Savile had abused young children on the wards

Savile was so close to Charles that not only did he advise on the appointment of a senior aide, but also sacked another figure because, I was told, the Prince didn’t have the stomach to do it himself.

Astriking indication of Savile’s reach — and the Prince’s questionable judgment — came in 1990 when Charles asked him for advice before choosing Major-General Sir Christopher Airy to be his private secretary. Savile and Charles then met Airy before he was offered the post.

Around that time, Savile took it upon himself to deliver the coup de grace to another prominent aide who had fallen under royal disapproval. Princess Diana insisted to me that Savile did the firing because ‘my husband couldn’t bear to’.

Unlike Charles, Diana was suspicious of Savile, the only man the Prince permitted to smoke in his home. ‘She was wary because she worked out that he was using the royals for his own publicity,’ the Princess’s former bodyguard Ken Wharfe tells me.

He was tolerated, however.

‘He would turn up unannounced at Kensington Palace,’ recalls Wharfe. ‘He would bamboozle the police on the gate and just breeze in. He would tell Diana he was on a mission “from the boss”, in other words her husband, but he just wanted to check up on her.’

He even arrived out of the blue during a walkabout the Princess was doing in Leeds. ‘He wasn’t meant to be there and we didn’t want him there, but there he was,’ says the ex-policeman. ‘He turned it into a Jimmy Savile visit. She was right to keep him at arm’s length.’ Later, Diana herself told me she had always found Savile ‘creepy’. She said that she had once recoiled from him when he went to greet her with a kiss to her hand, but had instead licked it.

No royal was safe from Savile's sinister embrace, with Prince Andrew called into help in an episode of JIm'll Fix It when an eight-year-old girl asked to visit a warship, and Princess Anne also appearing on the show

When the infamous ‘Squidgygate’ tape was published in 1992, Savile’s name came up. In the conversation between the Princess and Lotus cars executive James Gilbey, Diana was recorded saying: ‘Jimmy Savile rang me up yesterday, and he said: “I’m just ringing up, my girl, to tell you His Nibs [Charles] has asked me to come to help out the redhead [Fergie], and I’m just letting you know so that you don’t find out through her or him. And I hope it’s all right by you.” And I said: “Jimmy, you do what you like.” ’

Diana explains to Gilbey that this was to do with the Duchess of York’s poor public image. Diana went on: ‘He said: “You can’t change a lame duck — or something — but I’ve got to talk to her ’cos that’s the boss’s orders and I’ve got to carry them out. But I want you to know that you’re my number one girl.’ The Princess then describes Savile as a ‘sort of mentor’ to Charles.

This week, the Mail’s Ephraim Hardcastle column suggested that in 1984 Charles had included Savile’s name on a list of potential godparents for Prince Harry.

The eccentric suggestion was said to have reduced Charles’s private secretary, Sir Edward Adeane, a stiff courtier of the tweed-and-tradition set, to a state of bemusement. He was found wandering in a dazed state at St James’s by a friend from the Lord Chamberlain’s office, who sat him down with a stiff drink.

Subsequently Adeane sought advice from Sir Alastair Aird, the Queen Mother’s comptroller. Aird assured him the matter would be ‘dealt with’.

Whether Diana would have countenanced Savile’s proximity to her son seems highly unlikely.

And, sure enough, when Harry’s godparents were announced, there was no mention of Savile. Instead the Prince and Princess had opted for reliability, choosing Prince Andrew, the painter Bryan Organ and the Berkshire landowner Gerald Ward. At that point, however, Savile was not the omnipresent figure he had become by the end of the decade.

Savile was a guest at Charles’s 40th birthday party at Buckingham Palace in 1988, and at his 50th. When Prince Charles received a gift of a box of Cohiba cigars from Fidel Castro, he passed them on to Savile

‘Like the Fool in King Lear, he was allowed to say things to Prince Charles that other courtiers were not,’ Diana’s former private secretary Patrick Jephson told me.

On one occasion, Charles was getting tetchy because the royal train was running late. Savile, who was with him, asked: ‘What do you want me to do? Shoot the station master?’

He used the same easy familiarity to persuade staff to let him come and go as he pleased at St James’s Palace. Dickie Arbiter, who handled media relations for the Prince and Princess of Wales, said Savile’s presence was deeply uncomfortable.

‘He would walk into the office and do the rounds of the young ladies, taking their hands and rubbing his lips all the way up their arms if they were in short sleeves,’ he recalled. ‘His bottom lip would curl out and he would run it up their arms.’

And because Savile had the run of Stoke Mandeville, Broadmoor and other hospitals, Charles believed him to be an obvious person to tap for advice on Britain’s health authorities.

But health chiefs were said to have been ‘gobsmacked’ to arrive for a meeting at Highgrove to find Savile at the table. He apparently threatened the officials after the Prince left, saying making them unhappy could cost the officials a knighthood.

Savile was a guest at Charles’s 40th birthday party at Buckingham Palace in 1988, and at his 50th. When Charles received a gift of a box of Cohiba cigars from Fidel Castro, he passed them on to Savile.

Later still, on Savile’s 80th birthday, Charles despatched another box of cigars, together with a pair of gold cufflinks and a note that bizarrely read: ‘Nobody will ever know what you have done for this country Jimmy. This is to go some way in thanking you for that.’

Reading that again today in the light of Savile’s appalling sexual aggression, Charles must surely cringe with embarrassment.

You might argue that Savile took in the Establishment and the BBC with equal cunning. But there is something about the heir to the throne being so utterly gulled — and, in turn, giving Savile carte blanche to grease up to the rest of the Royal Family — that is truly disturbing.