Queen Wilhelmina of the Netherlands sought to broker a deal via the Vatican in which senior Nazis at the end of the second world war would be helped to escape Europe in return for Germany releasing the Belgian king, according to newly discovered documents.

Diaries of her war-time foreign minister, Eelco van Kleffens, suggest that Wilhelmina, the great-grandmother of the current Dutch King, Willem-Alexander, ordered her government in March 1945, two months before the end of the war in Europe, to scope out whether top Nazis could be offered an escape route as a trade.

King Leopold III, who had refused to go into exile with his government at the time of the German invasion in 1940, had by this time been moved as a result of the D-Day landings from house imprisonment in the royal chateau in Laeken, Belgium, to a villa in Strobl, Austria, where he was under the guard of the Waffen-SS.

Wilhelmina, who was vehemently anti-Nazi, sought to devise the rescue plan after a conversation with the Belgian Queen Mother, Elisabeth, who was still in Brussels and feared that the Germans would liquidate the Belgian royals in the last months of the war.

The outcome of the queen’s orders, made to Van Kleffens, one of the few Dutch ministers she trusted, are revealed in a newly published history of the period.

The Belgian king and his wife, Mary Lilian Baels, a London-born non-royal whom he met while under German guard, were eventually liberated by US troops when they accidentally came across the couple on 7 May 1945, on the day of Germany’s unconditional surrender.

Leopold’s conduct during the war, including his refusal to join his exiled government, his surrender of the Belgian army after two weeks without the consent of ministers, and a visit to see Adolf Hitler at the German führer’s Berghof retreat in the Alps, led to persistent rumours that the king held Nazi sympathies.

Leopold’s war record was vilified by both the French prime minister Paul Reynaud and the former British prime minister David Lloyd George, who claimed that in the “black annals of the most reprobate Kings of the earth” there was not “a blacker and more squalid sample of perfidy and poltroonery than that perpetuated by the King of the Belgians”.

Leopold did not return to Belgium immediately on his liberation instead naming his brother, Prince Charles, as regent while he moved to Switzerland.

It was only after a 1950 referendum in which 72% of Flemish speakers and 42% of Francophones voted for his return to the throne that he came back. The controversy over Leopold’s record continued, however, leading to riots, and his eventual abdication in 1951 in favour of his 20-year-old son, Baudouin.

Relations between Leopold and the British royal family were cool in the postwar years until Queen Elizabeth II invited Leopold to visit her in Buckingham Palace in May 1956. He died on 26 September 1983, aged 81, following a heart attack. He was laid to rest at the Royal Crypt of Laeken, among other Belgian kings.