In 2014, Stern messages Epstein to say that “PA [Prince Andrew] sends his birthday wishes and love” alongside a picture of him with the then-Duke and Duchess of York.

The message apparently from Stern also wishes Epstein “Happy Birthday” and shares a crude photo of champagne being poured down a naked woman, adding: “Champagne for you (even though you don’t drink it)”.

He appears to keep in frequent contact with Epstein about his work and access to the Palace, emailing Epstein in 2010 that he was at Prince Andrew’s “birthday party” and boasting about the famous celebrities he had encountered.

Other emails seem to show that Stern had also acted around this time as a conduit between Epstein and Sarah Ferguson, the former Duchess of York.

In 2011, emails include one from Stern’s account which sent Epstein a message from “Sarah” mentioning “The Duke”, in which she congratulates him on the apparent birth of a “baby boy”.

After the crash of a business venture in 2009, Ferguson also appears to write to Epstein: “I urgently need 20,000 pounds ($27,521) for rent today” following an exchange with Stern, which she is copied into.

A spokesman for Sarah Ferguson previously told the BBC that she was told to congratulate Epstein on a baby but has no knowledge beyond that.

Further emails, as part of the three million published last week, also shed new light on Epstein’s apparent invitation to have dinner with “The Duke” at Buckingham Palace in 2010, and that the sex offender requested to bring three women along with him.

On 27 September that year, Epstein emails “The Duke” to say that he is in London and asks what time Mountbatten-Windsor would like him and a woman, who the BBC is not naming.

“The Duke” suggests they could have “dinner” at Buckingham Palace and “lots of privacy”, to which Epstein agrees, responding that he is with three women.

Epstein asks if he should “bring them all, so as to add some life”, in the email exchanges. “Yes. Plenty of space here for chat! Bring them,” says “The Duke”.

In a previous email, sent months prior, Epstein had described one of the women as “a great friend” and “very pretty” after “The Duke” asked who she was.

Another email, sent the evening before the dinner, appears to show that Epstein had also personally invited a fourth woman to the Buckingham Palace meet-up, asking if she wanted to join and that she agreed.

The BBC has approached Mountbatten-Windsor for comment. He has always denied any wrongdoing arising out of his association with Epstein.

The BBC has spent days trying to contact Stern for comment.