Anne Keast-Butler has been appointed as the first woman director of the UK's intelligence, security and cyber agency GCHQ, the government announced on Tuesday.

She will take over in May from Jeremy Fleming, who announced in January that he was to leave the post after six years.

Foreign Secretary James Cleverly, whose remit includes oversight of GCHQ and the overseas intelligence agency MI6, said Keast-Butler was "the ideal candidate".

She "has an impressive track record working at the heart of the UK's national security network, helping to counter threats posed by terrorists, cyber-criminals and malign foreign powers", he added.

Keast-Butler, a Cambridge University maths graduate who has 30 years' experience in national security and is currently deputy director of the UK's domestic intelligence agency MI5, said she was "delighted" at her appointment.

She called GCHQ's work "as inspiring today as it was when it was founded more than 100 years ago, operating at the very heart of the UK and our allies' response to some of the most challenging issues of our time".

"In just the last year GCHQ has contributed vital intelligence to shape the West's response to the illegal Russian invasion of Ukraine; helped disrupt terrorist plots; and worked tirelessly to tackle the ongoing threat of ransomware, the impact of which costs the UK dearly."

Government Communications Headquarters (GCHQ) is primarily based in the town of Cheltenham, western England.

During World War II, it was based at Bletchley Park, where it was responsible for breaking Nazi Germany's Enigma codes.

GCHQ is now chiefly responsible for information gathering, analysis and increasingly cyber-security.