Sir David Pepper became director of GCHQ in 2003
The former chief of the Government Communications Headquarters (GCHQ) in Cheltenham has talked about his career at Gloucestershire's security centre.
Sir David Pepper worked at the top secret listening post for nearly 36 years including five years as director.
Sir David wrote that the intelligence agency "is pretty mysterious for those who do not work there".
He began his career in 1972 and said: "The GCHQ I first knew was very much a Cold War organisation.
'Very different world'
He began his career in 1972 during the Cold war and said: "The GCHQ I first knew was very much a Cold War organisation.
"We were very hierarchical, with a rather rigid structure and limited internal communications. This is not a criticism - the work we did during that period was excellent, and our response to crises such as the Falklands War could be first class."
He retired last month and gave a rare insight into the workings of GCHQ in an article for a local newspaper.
In his editorial column for the Gloucestershire Citizen, he talked about how things had changed by the 1990s.
He said: "But by the 1990s it became clear that a different approach was needed for a very different world, with volatile and global threats and the arrival of the internet.
"The Cold War focus was on the Soviet Union. Now our biggest area of work by far is our contribution to counter-terrorism.
"And support to deployed British forces has become a major activity."
Sir David also remembered various experiences during his career.
He said: "Being summoned to Robin Cook's office the day after the 1997 election to be given instructions to negotiate the return of the national trade unions to GCHQ.
"Rushing to London on 7 July 2005, blue lights flashing, to attend the Prime Minister's emergency meeting after the London bombings.
"Ducking for cover in Basra and Baghdad as rockets landed not far away, sitting in London's Guildhall at the Lord Mayor's banquet for President Sarkozy, and on and on."
Sir David Pepper was knighted in 2005 and was succeeded at GCHQ by Iain Lobban in July 2008.