Russia and China are amping up their espionage on Western nations, and there is a “narrowing window for the U.K. and allies to stay ahead,” according to Britain’s spy chief.

In a rare speech Wednesday at Bletchley Park, an estate in Buckinghamshire, England, that was the center of Allied code-breaking efforts during World War II, Anne Keast-Butler, the director of GCHQ, the U.K.’s intelligence and cybersecurity agency, warned of a renewed threat to the West from newly emboldened adversaries.

Part of this threat has to do with AI and its transformation on warfare.

“Warfare is being reconfigured; increasingly data-driven, AI-enabled, and automated in conflicts from Ukraine to Iran,” she said, adding “China is now a science and tech superpower with sophisticated capabilities across their intelligence, cyber, and military agencies.”

At the same time, Russia is increasing its aggression abroad, she added.