The Queen confided to the German ambassador that she believed the future of Britain lay in Europe, newly released diplomatic cables from 1988 have shown.

“Some have not realised this yet,” the monarch allegedly said of her subjects. She also appeared to back the creation of the single market.

In a memo composed on the occasion of his farewell visit to the British head of state on 25 November 1988, the then ambassador Rüdiger Freiherr von Wechmar reported that the conversation during an “emphatically warm and unrestrained” meeting had moved on to the subject of the British people’s attitude to Europe.

“With a smirk,” Wechmar wrote, “she noted that the Brits are still a very insular people, and to most of them the magical number 1992 doesn’t mean very much.”

That was a reference to the fact that, two years previously, European leaders including the then prime minister, Margaret Thatcher, had signed the Single European Act, which set the member states of the bloc the objective of establishing a single market by the end of 1992, a commitment that culminated in the Maastricht treaty.

When the German diplomat praised a well-funded campaign by the trade secretary, David Young, aimed at advocating the benefits of the single market, the Queen replied: “It’s about time.”

Wechmar, a former journalist who left his post to campaign for Germany’s liberal Free Democratic party in the European elections, said he could not shake off the impression that Thatcher wanted “a different Europe to the one we want”.

The Queen’s response, he said, “spoke of the tension between the two women”. “That will soon change,” the monarch allegedly said. “If she is still around.”

Thatcher resigned in 1990.

When Wechmar mentioned Thatcher’s ability to go with the political flow, the Queen pointedly said: “Yes, even she has now discovered the hole in the ozone layer.”

Overall, the cable states that the Queen left Germany’s top diplomat at the time with “no doubt that the future of Britain lies in Europe”.

The diplomatic document, which is held in the German foreign ministry’s political archive, is about to be released by De Gruyter publishing house on behalf of the country’s Institute for Contemporary History. Excerpts from the cable are published in the current edition of Der Spiegel magazine.

As head of state, the Queen has to remain strictly neutral with respect to political matters – a fact that has not stopped media and the public from speculating about her stance on Brexit.

Three months before the UK’s referendum on leaving the European Union, the Sun announced on its front page that “The Queen backs Brexit”. The claim caused a huge row with Buckingham Palace, which said that the headline was misleading. The tabloid stood by its piece, however.

A year after the vote, the monarch’s choice of a blue hat with yellow flowers during a speech in which she read out new laws to prepare the UK for its departure from the EU led some to speculate that Elizabeth may in fact be a closet remainer.

While the Queen’s son Prince Charles enjoys a more outspoken reputation, he too spoke only in euphemistic terms about the future of relations between Germany and Britain during a visit to Berlin at the start of this month.

Noting a “relationship in transition”, the prince insisted that “we are so much more than simply neighbours: we are friends and natural partners, bound together by our common experience, mutual interests and shared values, and deeply invested in each other’s futures”.

Buckingham Palace declined to confirm or comment on the accuracy of Wechmar’s account of the meeting.