A spy chief who led MI5’s preparations for the London Olympics has been named as the new head of GCHQ.

Jeremy Fleming will succeed Robert Hannigan as director of the agency often referred to as Britain’s listening post.

His appointment was announced on Monday by Foreign Secretary Boris Johnson, who said he is a “dedicated public servant whose work over two decades in the intelligence services has helped to keep our country safe”.

Mr Johnson said the “skill and ingenuity” of the UK intelligence community are “critical to defending Britain from cyber attacks, terror plots and other activities that threaten us and our allies”.

Mr Fleming, a career MI5 officer who is currently deputy director-general at the service, will be in a public-facing role for the first time once he takes up his new post next month.

Jeremy Fleming is the new head of GCHQ Jeremy Fleming is the new head of GCHQ (Foreign Office/PA)

He first joined the government from the private sector in 1993, rising through the ranks to become one of MI5’s most senior officials.

His work in the organisation included leading its preparations for the London 2012 Olympics.

The 49-year-old said: “From managing cyber risks posed by nation states to preventing terror attacks, keeping our children safe online and supporting our Armed Forces, the exceptional men and women of GCHQ operate on the new frontline of global challenges.”

He paid tribute to Mr Hannigan, who announced in January that he was stepping down after just over two years as director, saying he has “led GCHQ through the transformation of some of our most important national security capabilities”.

Mr Hannigan said: “I’m delighted that the Foreign Secretary has appointed Jeremy Fleming to be the new director. He comes with deep intelligence experience and expertise.”

GCHQ has seen its activities take on particular significance in recent years as terrorists use increasingly sophisticated technology to avoid detection.

Mr Fleming will also oversee the agency’s efforts to counter the threat from hackers amid mounting concern over the danger posed by cyber attacks.