Prince Andrew
Papers filed in a US court allege Prince Andrew has sexual relations with an underage girl Getty

Prince Andrew could be granted immunity from prosecution for his alleged involvement in underage sex crimes, under a secret deal struck with the US government.

The agreement was made with US prosecutors in 2007, and protects billionaire sex offender Jeffrey Epstein, along with any of his "co-conspirators" from charges related to an alleged international sex trafficking ring, according to the Sunday Times.

Details of the "non-prosecution agreement" come after Andrew was accused in US court papers of having sexual relations with a 17-year-old girl who was allegedly used as a sex slave by Andrew's friend Epstein, a former investment banker.

The unnamed woman, who is believed to be Virginia Roberts, now a 30-year-old mother of three living in Australia, said that she was forced to have sex with Andrew in London, New York and the Caribbean, at parties organised by Epstein.

Named as Jane Doe 3 in the court documents, Andrew's alleged victim says that she was told by Epstein to "give the prince whatever he demanded".

She also claims that she and other underage girls were "procured for sexual activities" by Ghislaine Maxwell, daughter of disgraced media tycoon Robert Maxwell.

Ghislaine Maxwell is described in the court documents as a "madame" and a "primary co-conspirator in [Epstein's] sexual abuse and sex trafficking scheme".

Court documents filed in Florida and obtained by the Sunday Times allege that Epstein used his "significant social and political connections" to secure the secret deal.

According to the documents, the Duke and former US president Bill Clinton helped Epstein obtain a more favourable deal.

The former financier was jailed for 18 months in 2008 for soliciting paid sex with minors under a secret deal which saw more serious federal charges dropped.

On Saturday, Buckingham Palace issued an unprecedented second denial that the Duke had sexual relations with the alleged victim.

In a strongly worded statement, a palace spokesman said: "It is emphatically denied that the Duke of York had any form of sexual contact or relationship with [the woman]. The allegations made are false and without any foundation."

The denial comes after the Mail on Sunday and the Sunday Mirror published details of interviews with the woman at the centre of the sex crime allegations.