Media playback is unsupported on your device Media caption The Sun's editor-in-chief Tony Gallagher says he is "in no doubt" the article is accurate

The Sun's editor-in-chief has said he is "in no doubt" that the newspaper's article claiming the Queen backs a UK exit from the EU is accurate.

Tony Gallagher told the BBC he was "completely confident" that the report and its headline reflected her views.

Buckingham Palace complained to the press watchdog on Wednesday about the article, which was headlined "Queen backs Brexit".

The palace has insisted the Queen is "politically neutral".

The Sun quoted anonymous sources, one of whom claimed to have witnessed a "bust-up" between the Queen and pro-EU former Deputy Prime Minister Nick Clegg in 2011.

Mr Clegg has said he could not remember any such incident and called the story "nonsense".

'Inconvenient story'

The UK is due to hold an in/out referendum on its membership of the EU on 23 June.

All you need to know about the EU referendum

UK and the EU - better off out or in?

Mr Gallagher told BBC Radio 4's Today programme that it was "not my fault" if the Sun had published an "inconvenient" story.

He said the paper's duty was to its readers, "not the elite who might be upset at what we've written".

Image copyright AFP Image caption "We knew much more than we published," said Tony Gallagher

Asked if the headline "Queen backs Brexit" had been overwritten, he replied: "Absolutely not."

"We knew much more than we published."

When it was put to him that the Queen's alleged remarks had been made before it was known there would be a referendum, Mr Gallagher said this was "semantics".

Analysis

Image copyright Getty Images

By Peter Hunt, BBC royal correspondent

Tony Gallagher's was a robust defence, which offered the possibility the Sun has more information to bolster the claim that it's a Eurosceptic Queen that reigns over us.

Any future revelations won't alter the complaint sitting in the press watchdog's in-tray.

"Queen backs Brexit" was a headline that stuck in the monarchical craw.

It wasn't supported, as far as the palace is concerned, by any of the quotes in the Sun article.

Before the Queen was in its sights, the tabloid had criticised Prince William for being work shy - an accusation echoed in other newspapers.

It's led some to question whether this signals the start of a shift in how the papers portray the royals.

The reality is more likely to be that recent coverage serves as a reminder of the media's complex relationship with the Windsors - a family which over time has been both praised and pilloried in print.

Read more from Peter

Leader of the House of Commons Chris Grayling, who wants Britain to leave the EU, told Today that conversations with the Queen were "always to be kept private".

The Sun's report said the Queen's exchange with Mr Clegg left "no room for doubt about her passionate feelings over Europe" and "stunned other guests".

The paper said the Queen also revealed her feelings about Europe during a separate conversation with MPs at Buckingham Palace "a few years ago", allegedly speaking the words "I don't understand Europe" with "venom and emotion".

Image copyright PA Image caption Buckingham Palace said the Queen had always been politically neutral

Prime Minister David Cameron, who is leading the campaign for Britain to stay in the EU, said Justice Secretary Michael Gove, who backs so-called Brexit, had "made clear" that he was not the source of the apparent leak.

"He has no idea where this story came from," the prime minister told the BBC, following a report in the Daily Telegraph that Mr Gove was facing claims he was the source.

The Buckingham Palace complaint to the Independent Press Standards Organisation (Ipso) was made under clause one of the editors' code of practice, which relates to accuracy and specifies that headlines should be supported by the main text of reports.

Ipso declined to comment on the inquiry or timing of publication, referring the BBC to its website, which says decisions are published "as soon as is reasonably possible following the conclusion of the complaint".