A grenade is thrown into a trench in 1915. A. Grohs / Patrimonio Nacional. Madrid, Archivo General de Palacio

“Your Majesty, Mother is crying all the time because her brother has been taken prisoner. She has just received a letter that says he will die of hunger. Your Majesty, if you could send him to Switzerland… because Mother is certainly going to make herself ill. Your Majesty, I thank you in advance. Your servant, Sylviane [8 years old, France, April 1917].”

This was a letter from a desperate young girl during the First World War who had got wind of the fact that the King of Spain, Alfonso XIII, was running a rescue operation for prisoners out of the Royal Palace. This was the reply she received:

There is evidence that his efforts were instrumental in lifting the siege on Belgium so that food from the US could reach its nine million inhabitants

“Dear Miss, I will do my best to stop your mother from crying. So be so good as to send me exact news of your uncle so that I can take the matter further. Alfonso XIII, King.”

Achille Delmonte, the French prisoner of war in question, was found in a camp in Hanover, Germany, and taken to a clinic in Switzerland. The file, which had been gathering dust in the Royal Palace in Madrid for more than 100 years, records a “positive result.”

Having been dusted off, it now forms part of an exhibition called Letters to the King. The humanitarian activities of Alfonso XIII during the Great War. Open from November 14 to March 31, the display unveils the actions of a man trapped between two worlds at war: the Austria-Hungarian world of his mother Maria Christina Henriette Desideria Felicitas Raineria of Austria, and the British world of his wife, Victoria Eugenie de Battenberg.

For eight years, experts have trawled their way through more than 200,000 of the letters he received – 140,000 of them from relatives of soldiers – and have exposed one of Spain’s most spectacular feats of diplomacy.

Related to practically all of Europe’s kings and queens, King Alfonso acted as something of a go-between both in a diplomatic and humanitarian capacity during a conflict that cost 10 million lives, through his European War Office.

The office depended directly on the King’s personal secretary and was a modest affair in 1915, with just six members of staff. But the publication of a thank you letter in a French newspaper, Le Petit Girondais, triggered an avalanche of letters from all over Europe asking for help. Consequently, the operation had to expand its staff to 48, all of whom were required to speak several languages. Among them was the historian Julián Juderías, who spoke 15 languages and who, despite being seriously ill, threw himself into the work until the day he died.

“In the name of Jesus, I beg you to address the Emperor so that my father can return,” pleads one. And another: “He was my only son, my only comfort, my only hope as I grow old.” And yet another: “He was the best of husbands, but if he gave his life for Old England, I think I would be able to stand it.”

Each letter was awarded its own file as a bid was made to find a solution. Some had photos attached – one pointing out, “The photo will help you find him – this is his tattoo.” And all were answered thanks to what Juan José Alonso Martín, director of the Palace General Archives, has described as “a primitive computing system.”

Dear Miss, I will do my best to stop your mother from crying. So be so good as to send me exact news of your uncle so that I can take the matter further. Alfonso XIII, King

The files were color coded according to the request and the nationality of the author. Labels were attached, copies made and a reply sent out to the sender as well as to the relevant authorities. “They were even stamped according to the importance of the message,” says one expert.

As the King’s wife was first cousin to the Tsarina, it is not surprising that the King became involved in efforts to help Tsar Nicholas II and his family who had been taken prisoner by the Bolsheviks in Yekaterinburg.

In a file that contained 90 documents, there were telegrams sent to the plenipotentiary in St. Petersburg trying to negotiate a visit to the Tsar and his family – staff from the office visited more than 4,000 prisoners all over Europe during the war. Alfonso XIII offered the Russian royals asylum in Spain, but the Romanovs were shot before the rescue operation could be carried out. Though Alfonso XIII was apparently one of the first to learn of the death of the Tsar and his son, he remained ignorant of the fate of the Tsarina and the couple’s daughters, and his efforts continued for some time after their deaths. Then suddenly, without any explanation, the correspondence comes to an abrupt halt.

Of particular concern to the king was the fate of the prisoners of war, and he proposed suspending death sentences for German and French soldiers. It is thought that his appeals on their behalf saved almost 100 lives. And of those he searched for, he found 5% by proposing prisoner swaps to the ambassadors of Paris, Vienna, London, Berlin, Rome, St Petersburg, Constantinople, Bucharest, Sofia and the Hague.

Of particular concern to the king was the fate of the prisoners of war

There is also evidence that his efforts were instrumental in lifting the siege on Belgium so that food from the US could reach its nine million inhabitants.

When the war was over, Spain’s humanitarian efforts were internationally acclaimed, according to Antonio Escámez Torres, president of the Santander Bank Foundation that funded the research together with Spain’s National Heritage Trust. The diplomats involved in the operation received the Reconnaissance Française medal, the women received the Red Cross medal and the rest of the staff received the Order of Isabel the Catholic Queen. King Alfonso himself was thanked by the people of Belgium and Italy in 1923 and was awarded The Great Cross of the Order of Charity, which he famously said belonged not to him but to Spain.

The exhibition has been laid out so that visitors can pick the files off the archive shelves and browse through them. There are hundreds and hundreds of boxes with more than 200,000 stories inside, full of the hope of desperate human beings and of a king keen to come to their rescue.