London (CNN) Buckingham Palace has complained to Britain's press watchdog after a tabloid newspaper published an article suggesting Queen Elizabeth II was in favor of the UK leaving the European Union in a forthcoming referendum.

A palace spokeswoman said a complaint had been made with the Independent Press Standards Organization over Wednesday's front-page article in The Sun headlined, "Queen backs Brexit."

The complaint related to Clause 1 of the Editors' Code of Practice , which applies to issues of accuracy, the spokeswoman said.

Earlier Wednesday, the palace issued a statement insisting the Queen was neutral on whether the UK should vote to leave the EU -- a development widely referred to in the press as a "Brexit," or "British exit."

The UK will have a national referendum June 23 to vote on whether to leave or stay in the 28-member bloc.

Britain is a constitutional monarchy in which the royal family is seen as above the political fray.

Palace: Queen 'remains politically neutral'

Citing an unnamed "senior political source," The Sun said that at a 2011 lunch at Windsor Castle, the Queen told Nick Clegg, then the deputy prime minister, that the EU was heading in the wrong direction.

The newspaper quoted the source as saying that those present "were left in no doubt about her views on Europe."

However, Buckingham Palace released a statement Wednesday insisting the Queen remained "politically neutral as she has for 63 years."

The statement continued: "We will not comment on spurious, anonymously sourced claims. The referendum is a matter for the British people to decide."

Clegg, the former deputy prime minister and current member of Parliament who was supposedly party to the conversation, denied that it took place.

"As I told the journalist this is nonsense," he tweeted. "I've no recollection of this happening (and it's) not the sort of thing I would forget."

Re Sun story. As I told the journalist this is nonsense. I've no recollection of this happening & its not the sort of thing I would forget — Nick Clegg (@nick_clegg) March 8, 2016

In response to reports of the palace's complaint, a spokesman for The Sun defended the newspaper's story.

"The Sun stands by its story, which was based upon two impeccable sources and presented in a robust, accessible fashion. The Sun will defend this complaint vigorously," he said in a statement.

Last month, sections of the British media interpreted remarks by the Queen's grandson Prince William as suggesting Britain would be better off in Europe.

But a spokesman for the prince denied the speech had anything to do with the European question.

Stay or go?

British Prime Minister David Cameron has been campaigning for the UK to remain in the EU, arguing that a deal struck with European leaders to give Britain "special status" within the bloc meant it would have " the best of both worlds.

JUST WATCHED How might British press influence 'Brexit' debate? Replay More Videos ... MUST WATCH How might British press influence 'Brexit' debate? 05:50

He argues that the British economy -- the second-largest in the bloc -- will suffer if the country opts out, and that Britain will be stronger and safer against global threats such as Islamic terrorism and Russian aggression if it remains part of the EU.

But high-ranking members of Cameron's Cabinet and Boris Johnson, London's charismatic mayor and one of the UK's most popular and influential politicians, have all come out in support of the "Leave" campaign.

They argue that membership in the EU is a costly burden that brings unnecessary regulations and excessive migration, and diminishes Britain's sovereignty.

Britain in the EU

The European Union has its origins in a free-trade zone established in the 1950s.

European nations sought closer ties in the hope that economic integration, and the free movement of goods and people, would prevent a recurrence of the catastrophic war that ravaged the continent a decade earlier.

JUST WATCHED What is the European Union? Replay More Videos ... MUST WATCH What is the European Union? 02:00

But Britain has always been slightly aloof from the union, remaining outside the Schengen Agreement, which allows passport-free travel among most European countries, and opting to retain the pound rather than adopt the euro.

Among the concessions Cameron wrung from European leaders ahead of the Brexit referendum was a recognition that Britain would never commit to "ever closer union" -- the central goal of the EU and its predecessor organizations for decades.

Opinion polls have shown the British public sharply divided on the issue. A recent poll by YouGov on the referendum question found 40% support for remaining in the EU and 37% support for leaving.

The remainder responded they didn't know or wouldn't vote.