As cyberthreats continue to escalate, Britain's spy agency GCHQ is coming out of the shadows to fight hackers. Fighting off cyberattacks is now as important as GCHQ's spying efforts and defending against terrorism, according to the spy agency's head Jeremy Fleming.

Fleming, who previously served the deputy director of MI5, became the director of GCHQ in March. In one of his most extensive public comments, Fleming described how Britain's adversaries are quickly adapting to new technologies to harm the nation.

Writing in the Telegraph, Fleming said that although technological advances greatly benefit the public, "hostile states, terrorists and criminals use those same features — instant connectivity and encrypted communications — to undermine our national security, attack our interests and, increasingly, commit crime."

Fleming said that the government's funding is now being used "to make GCHQ a cyber organisation as well as an intelligence and counter-terrorism one." GHCQ's head added that over the past year, the spy agency's cyber arm — the NCSC (National Cyber Security Centre) has fended off nearly 600 "significant" cyber incidents. Fleming also mentioned that until the NSCS was set up, the GCHQ's in-house cyber division "too often felt like the poor relation".

Fleming's comments come after major cyberattacks, including the WannaCry ransomware epidemic, high-profile data breaches and the cyberattack on the Parliament, all of which Fleming mentioned in his write-up.

GCHQ's head said that despite the NSCS now possessing a "world-leading programme to reduce the incidence and impact of cyber attacks without users even noticing," it is still challenging for the spy agency to function as it did before. This is because the NCSC is much more visible, as it "proactively engages with the media, and has a high profile in schools and universities".

"All of this can feel deeply challenging for a GCHQ that by necessity has worked in the shadows," Fleming said. "It remains the case that much of what we do must remain secret. But I welcome the shift. If GCHQ is to continue to help keep the country safe, then protecting the digital homeland – keeping our citizens safe and free online – must become and remain as much part of our mission as our global intelligence reach and our round-the-clock efforts against terrorism."