The Queen has always been sceptical of the European Union (EU) and preferred Britain to work with the Commonwealth, the government’s official website says.

An article by Oxford historian D.R. Thorpe, posted on the “History” section of the UK government website, says the Queen had a fraught relationship with Edward Heath, the Conservative Prime Minister who first took Britain into what was then the European Economic Community (EEC).

“The relationship with Edward Heath was not always easy, as his world-view differed sharply from that of the Queen,” the article says.

“European integration was Heath’s vision. The Queen, however, saw her role as Head of the Commonwealth to be of supreme importance.”

The revelation comes after The Sun newspaper caused a political storm this week after it reported that the Queen backs Brexit. It said the Queen “let rip” at then Deputy Prime Minister Nick Clegg at a private meeting at Windsor Castle, telling him the EU was going in the wrong direction.

The paper quoted a source who said: “People who heard their conversation were left in no doubt at all about the Queen’s views on European integration.

“It was really something, and it went on for quite a while. The EU is clearly something Her Majesty feels passionately about.”

The Queen complained to the UK’s press watchdog over the story, with Buckingham Palace issuing a statement denying the claims.

“The Queen remains politically neutral, as she has for 63 years,” they said. “We would never comment on spurious, anonymously sourced claims. The referendum will be a matter for the British people.”

However, The Sun is now pointing to the D.R. Thorpe article as evidence of the Queen’s eurosceptic views.

They also quote several royal biographies that back up the view, including Counting One’s Blessings: The Selected Letters of Queen Elizabeth the Queen Mother, in which biographer William Shawcross writes:

“When in January 1963 de Gaulle magisterially said ‘Non!’ to Britain’s application to join the European Economic Community (as it then was), Queen Elizabeth was not outraged. Her sympathies were with the Commonwealth and with individual European countries, not with a bureaucratic institution.”

Sarah Bradford, in her biography of the Queen, also writes: “The Queen, according to some pro-European politicians, was not anti-Europe, but there is little doubt that she did not share Heath’s passion for the alliance to the detriment of two other important relationships which she cherished – with the Commonwealth and with the United States.”

Speaking ahead of a Grassroots Out rally in Newcastle, UKIP leader Nigel Farage said he “quietly” hoped the Queen backs Brexit.

“I have spoken to a few members of the royal family on social occasions,” he said. “I don’t know if Her Majesty favours Brexit. I’m certain she will say absolutely nothing during the course of this campaign.

“She has been the monarch for 64 years, what she says in private and what she says in public are two very different things. But I quietly, quietly, hope she does.”