A nondescript red brick building tucked away beside a pub near a park in central London was revealed on Friday to have been the base of one of the world's most sophisticated spy services - Britain's GCHQ eavesdropping agency.

GCHQ, which gathers communications from around the world to identify and disrupt threats to Britain, only revealed the Palmer Street address, its London home for 66 years, after moving out.

"As we depart our Palmer Street site after 66 years, we look back on a history full of amazing intelligence, world-leading innovation, and the ingenious people who passed through those secret doors," GCHQ Director Jeremy Fleming said.

"Then, as now, it’s a history defined by the belief that with the right mix of minds, anything is possible."

He did not, however, say to where in London the secretive spy agency had moved.

The eavesdropping agency traces its history back to 1919 and is best known for breaking Germany's Enigma code during World War Two. It works closely with the Secret Intelligence Service (SIS) and the MI5 Security Service.

Government Communications Headquarters' futuristic "doughnut" headquarters is in the English city of Cheltenham but it moved into its London Palmer Street office in 1953.

"The Palmer Street hub has played its part in significant events over the years, such as the 2012 London Olympics," GCHQ said.

The National Cyber Security Centre (NCSC), which is part of GCHQ, opened its new headquarters near Victoria in London in 2017.

GCHQ, which was formed in 1919 under the original name of the Government Code and Cypher School, has other offices in Cornwall, Scarborough, Lincolnshire and Harrogate.

In February, Queen Elizabeth unveiled a plaque with a secret message when she toured GCHQ's original top-secret London home until 1921 - Watergate House in Charing Cross - before it moved to Queen’s Gate in Kensington and then to Bletchley Park, north of the capital.

GCHQ has a close relationship with the U.S. National Security Agency as well as with the eavesdropping agencies of Australia, Canada and New Zealand in a consortium called "Five Eyes."