THE royal family allegedly reached a "secret agreement" with the Murdoch press to condone journalists hacking the phones of Prince William and Prince Harry, a court has heard.

The Duke of Sussex is suing News Group Newspapers (NGN), publisher of The Sun and the now-defunct News Of The World, over alleged phone hacking at its titles.

On Tuesday, NGN made a bid for a judge to throw out the case, as well as a similar claim brought against the publisher by actor Hugh Grant.

Harry’s lawyers said the bid is an attempt to go behind a “secret agreement” between the royal family as an institution and NGN – or its parent companies News UK and News Corp – which he claimed to have been informed of in 2012.

The High Court in London heard this alleged agreement prevented the duke and the Prince of Wales from bringing phone hacking claims against the publisher at the time.

READ MORE: Prince Harry phone hacking lawsuit against Daily Record publisher to go to trial

However, NGN has denied Harry’s claim that there was a agreement.

In his witness statement, the duke alleged that it was agreed royals would bring claims at the end of a series of cases about phone hacking and their cases would be resolved without trials.

Harry said: “My brother and I were also told by either the institution’s solicitor, or someone else from the institution, that there was no possibility of either of us bringing a claim against NGN for phone hacking at that time.

“The rationale behind this was that a secret agreement had been reached between the institution and senior executives at NGN whereby members of the royal family would bring phone hacking claims only at the conclusion of the mobile telephone voicemail interception litigation and at that stage the claims would be admitted or settled with an apology.”

Harry claimed the agreement was to avoid having a member of the royal family going into a witness box and describing the “private and highly sensitive voicemails” that had been intercepted.

Harry said the voicemails had been intercepted by Clive Goodman – who had worked at the News Of The World.

He continued: “The institution was incredibly nervous about this and wanted to avoid at all costs the sort of reputational damage that it had suffered in 1993 when The Sun and another tabloid had unlawfully obtained and published details of an intimate telephone conversation that took place between my father and step-mother in 1989, while he was still married to my mother.”

Harry later said that the alleged agreement “including the promises from NGN for delayed resolution was, obviously, a major factor as to why no claim was brought by me at that time”.

READ MORE: Sir Elton John and Prince Harry among group suing the publisher of The Daily Mail

The duke also said: “To say that I was frustrated and disappointed would be something of an understatement.”

His barrister, David Sherborne, said in written submissions that “discussions and authorisation” from the royal family over the agreement included the late Queen and two of her private secretaries, as well as private secretaries for both William and Harry.

However, Anthony Hudson KC, for NGN, said the duke’s allegation that there was a secret agreement is “flatly inconsistent” with other parts of his case.

He said in written submissions: “The allegation that the Duke of Sussex was told of such an agreement in around 2012 flies in the face of a contention that, by the same date, he lacked knowledge of facts sufficient to identify a worthwhile claim or to justify embarking on the preliminaries to a claim.”

Hudson said Harry has a “belated reliance on the asserted, unpleaded secret agreement between the institution and NGN”.

He continued: “This delay is matched by the extreme vagueness with which the circumstances of the secret agreement are described in the Duke of Sussex’s evidence.”

The barrister said that Harry did not say in his evidence who made the agreement, who it applied to, when it was made, or a date when it was meant to expire.

Hudson added: “The account notably contains no explanation as to how it is said that the Duke of Sussex could have been made party to such an agreement without having had any prior knowledge of it, and thus no ability to confer authority or instructions upon anyone to enter into the agreement on his behalf.”