It is not clear why Juan Carlos received the gift but the Spanish and Saudi royal families were known to be close. In September last year the former king's one-time lover was questioned over her claims that Juan Carlos pocketed money from a high-speed train contract with Saudi Arabia.

In Lucum’s statutes, King Felipe, then the Prince of Asturias, is named as the foundation’s second beneficiary, and charged by his father with the duty to look after the rest of the family in the event of him inheriting the fund.

“The second beneficiary must […] provide maintenance for the lifetime of all members of the royal family”, and “satisfy any reasonable request that may be made on him” by his mother, sisters and their children.

Among the account movements detailed in the Lucum Foundation documents are four “cash transfers to Spain for personal needs” in the first six months of 2009 amounting to just over 800,000 euros.

The new documents are revealed days after anticorruption prosecutors in Spain asked a Swiss court for information on a reported gift from late Saudi King Abdullah to Juan Carlos.

A Swiss public prosecutor in Geneva is also investigating possible irregularities in another fund named Fondation Zagatka holding a commission taken from the disastrous sale of a Spanish bank to Barclays.

The principal beneficiary of the fund is Álvaro d’Orleans-Borbón, a 73-year-old cousin of Juan Carlos, who used the money to pay for €5 million of private flights taken by the former Spanish king between 2016 and 2019, The Telegraph revealed last week.

In a 2006 document establishing the statutes of Zagatka, the name of Spanish King Felipe also appears, this time as fourth beneficiary behind Mr d’Orleans-Borbón, his son and former King Juan Carlos.

The revelations constitute the first time that King Felipe has been directly linked to Juan Carlos’s alleged offshore fortune.

The Royal Household and Mr d’Orleans-Borbón declined to comment.

Last week Spain’s three largest political parties blocked requests by Unidas Podemos and other groups in Congress to hold an investigatory commission in the light of recent allegations aired in the media concerning Juan Carlos’s financial activities.

Gestha, the union that represents Spain’s tax inspectors, issued a statement on Tuesday asking Spain’s AEAT tax agency to open an investigation into Juan Carlos for “alleged tax fraud and money laundering” from 2015.

Spain’s Constitution says the figure of the king is “immune from responsibility”, and a law was passed specifically for Juan Carlos when he abdicated meaning he can only be prosecuted in the Supreme Court for acts committed after his reign.

However, Luis Rodríguez Ramos, a professor of criminal law, believes that the apparent immunity in the constitution is not complete due to a clause stating that the king’s actions must be countersigned by a minister.

“If this was interpreted strictly, when we are talking about a private activity that is clearly not countersigned by any other authority, it would appear that such actions fall outside the scope of this immunity.”

“Charging commissions as an intermediary and having offshore accounts does not form part of the role of head of state,” says former Supreme Court Magistrate José Antonio Martín Pallín.

Manuel Cancio, a professor of criminal law at Madrid’s Autonomous University, believes the king’s immunity is total while on throne – but that he could still be charged with money laundering related to his extensive fortune since abdicating.

Mr Martin Pallín said it would be “immoral and antipatriotic” if the current king held money abroad while sitting on the Spanish throne and “a breach in the principles of ethics, impartiality and solidarity in economic matters”.