The UK’s top intelligence agency have issued an apology after social media users spied it using an offensive word within an online quiz.

GCHQ (also known as Government Communications Headquarters) is famed for its code-breaking prowess, playing a key role in uncovering Nazi messages during the Second World War.

However on Tuesday (August 18), the security body appeared to have suffered a brief lapse in concentration when it included a swear word in the answer to one of its regular Twitter puzzles.

The unfortunate post underlined the fourth letter in the names of the planet’s Mercury, Venus, Uranus and Neptune.

A copy of the tweet, taken before it was swiftly deleted, can be found below.

Bournemouth Echo:

What have GCHQ said?

A GCHQ spokesman said: “We apologise for any offence inadvertently caused by this morning’s post.

"We deleted it as soon as we became aware of the issue.”

The tweet was deleted after being online for less than 20 minutes.

Was an alternative puzzle posted?

Yes - a different version, minus the swearing, was later posted online.

This time underlining the fourth letter in the names of all eight planets in the Earth’s solar system.

What was the reaction to the incident?

Twitter users were quick to mock the error.

One tweeted: “GCHQ have deleted their … see you next Tuesday tweet”.

Another added: “I hear the bureaucrats secretly giggling.”