EDINBURGH Castle has come under fire for an embarrassing blunder involving a Scottish King born in the historic fortress.

The castle’s official Twitter account was the cause of “despair” among historians on Tuesday when it sent out a tweet referring to King James VI and I only by the title he acquired after the Union of the Crowns.

The offending tweet read: “[On this day] in 1617 James I arrived at the castle for his one and only visit back to Scotland during his reign.

“As the only monarch born at the castle, there are traces of his birth and reign throughout our buildings.”

James was the sixth king by that name to rule Scotland but also became the first of his name to rule England, hence the double numeral.

Historian Allan Kennedy, a lecturer in early modern Scottish history at Dundee University, reposted the tweet with the caption: “Seriously? You're the Edinburgh Castle account, and you're calling this king 'James I'? I really do despair sometimes.”

READ MORE: The Stone of Destiny returns to Edinburgh Castle in top secret trip

He added: “This is what I mean when I say Scottish history needs a firmer footing in the public realm.”

Edinburgh Castle defended the tweet, saying the omission of the Scottish title was due to character limits on the platform. 

Scotland remained an independent country under James’s rule. It was not absorbed into the Union as it is understood today until 1707 when the UK Parliament was established, 82 years after James’s death.

James was the subject of the Gunpowder Plot – the infamous failed attempt to restore a Catholic monarchy in England.

He also sponsored the translation of the Bible named after him, and his reign saw the flourishing of great English writers such as William Shakespeare and John Donne.

A spokesperson for Historic Environment Scotland, the Government body which runs Edinburgh Castle, said: "As part of the anniversary of James VI of Scotland (I of England, Wales and Ireland) visiting the castle in 1617, we issued a blog looking at his links to the castle.

"This covered the period following his coronation where he became James I and both of these references (VI and I) are used throughout the blog for historical context.

“The reference to James I in the accompanying tweet was purely due to character limitations, and the focus of the introduction to the blog being on his return after the Coronation and in the wider blog it links to this references James as both, as well as the wider historical context.”"