The Sun's Editor in Chief has insisted the newspaper did not make an error over its "Queen backs Brexit" headline despite a ruling by the press watchdog that it was inaccurate.

READ MORE: 'Queen backs Brexit' headline inaccurate, rules press watchdog

Tony Gallagher said the paper respected the Independent Press Standards Organisation but insisted the story justified the headline.

The complaint, about a story alleging the Queen expressed her anger with Brussels to then deputy prime minister Nick Clegg during a lunch at Windsor Castle, was the first by a reigning monarch to the press watchdog.

In its ruling Ipso found that the newspaper's front-page headline on March 9 had breached Clause 1 (accuracy) of the Editors' Code of Practice.

Mr Gallagher told BBC Radio 4's Today programme: "I don't accept that we made an error at all. We made a judgment that the headline was right and that it was backed up by the story."

He added: "I don't think were I doing this again tomorrow I would act in any way differently whatsoever. Given what I know about the detail of the sourcing and given what I know about the detail of the conversation, frankly, we would be better packing up and going home as journalists if we didn't actually put these things in the public domain."

Ipso said that while the article itself did not breach the code, the headline did as it was "a factual assertion that the Queen had expressed a position in the referendum debate, and there was nothing in the headline, or the manner in which it was presented on the newspaper's front page, to suggest that this was conjecture, hyperbole, or was not to be read literally".

The original Sun article said two unnamed sources had claimed that the Queen made critical comments about the EU at two private functions - first with Mr Clegg at a lunch for Privy Counsellors at Windsor Castle in 2011, and at a reception for MPs at Buckingham Palace.

At the time the report was published, former Liberal Democrat leader Mr Clegg dismissed it as ''nonsense'', while Buckingham Palace said: "The Queen remains politically neutral, as she has for 63 years.

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

Justice Secretary Michael Gove refused to rule out being the source of the leak and The Sun said it stood by its story and planned to defend against the complaint "vigorously".

The Sun carried an article in Wednesday's paper which details the ruling - ordered by Ipso as a remedy for the inaccuracy.

The article states: "Ipso acknowledged the importance of headlines in tabloid newspapers.

"However, it did not follow from the comments the article reported that the Queen wanted the UK to leave the EU as a result of the referendum: that suggestion was conjecture and the committee noted that none of those quoted in the story were reported as making such a claim.

"The headline was not supported by the text. It was significantly misleading - given that it suggested a fundamental breach of the Queen's constitutional obligations."

The decision is the first time Ipso has ruled on the newly-revised Clause 1 of the Editors' Code of Practice, which makes specific reference to "headlines not supported by the text" as an example of inaccurate, misleading or distorted information.

Commenting on the adjudication, Ipso chief executive Matt Tee said: "Clause 1 of the Editors' Code was amended in January 2016 with specific reference to 'headlines not supported by the text'.

"The Editors' Code Committee clearly wanted Ipso to pay close attention to the use of headlines, something we have done in the period since the new code was issued.

"The Sun's headline was significantly misleading and represented a failure to take care not to publish inaccurate, misleading or distorted information"

He added: "Ipso will continue to carry out our work without fear or favour and will continue to support those who feel wronged by the press, whoever they are."

Mr Gallagher said the The Sun had been left in "no doubt" that the Queen wanted Britain to quit the EU but had taken care not to identify its "impeccable" sources in the story.

He told the programme: "Self-evidently we were unable to compromise the people that told us that. We were in no doubt that the Queen's views were strongly of the opinion she would want to leave the European Union."

Buckingham Palace declined to comment on the ruling.

Evan Harris, joint executive director of press reform campaigners Hacked Off, said Ipso's action was "grossly inadequate".

He said: "This ruling shows everything wrong with Ipso - it was a clear and obvious code breach but the remedy is grossly inadequate.

"Millions of people read the false front page banner headline and they deserve to see the truth. But only a small proportion of them will read the adjudication to learn how they were misled, because the front page reference and the page two headline are both small and neither correct the record.

"The burying of the adjudication on page two, the absence of an actual correction and the absence of an apology all demonstrate that Ipso, like the PCC before them, strives to protect the newspapers that control them at the expense of the public interest.

"The Code requires 'due prominence' corrections and while the public think this should be 'equivalent prominence', Ipso thinks it means 'buried inside prominence'."