The West is faced with a "moment of reckoning" when it comes to technology and security, the head of intelligence agency GCHQ has told the BBC.
Jeremy Fleming said there was a risk that key technologies on which we rely will no longer be shaped by the West.
"We have to keep evolving our approach if we're going to keep up," he said of the growing challenge from China.
So-called smart cities, which will collect large amounts of data, are just one example, he added.
"The risk is that the technology is implemented in a way in which we can't assure its security," he warned.
The UK is a "big beast" when it comes to technology but "we can't take that for granted", the GCHQ director warned, saying this was a moment when we had to decide if we were going to continue to evolve and compete with our adversaries.
Mr Fleming was speaking ahead of giving this year's Vincent Briscoe Annual Security Lecture at Imperial College, and in the wake of the Integrated Review, which placed science and technology at the centre of future security and defence policy.
Lessons from 5G
The challenge from China is uppermost in the minds of intelligence chiefs across Western countries, particularly when it comes to technology.
"The risk, as I see it today, is that we lose control of the standards that shape our technology environment," he told the BBC.
"The things that make sure that our liberal Western democratic views are baked into our technology."
Mr Fleming said there were lessons to be learnt from the debate over the role of Chinese company Huawei in building a new 5G telecoms system. It was initially given a role in the UK, before being excluded following US sanctions.
But there were concerns that there were few other companies actually able to supply the latest technology.
"The conversation about 5G was really lost a decade ago, when Western nations decided that they weren't going to invest in the underpinning infrastructures... and the result was we just didn't have the choices," he said.
The imperative was to make sure in the future the UK took the kind of long-range decisions need to ensure it has choice - so there would not be the same concerns over dependency, he said.
Smart city fears
That need to look forward prompted a focus on smart cities.
These involve a vast number of sensors and cameras built into a city's infrastructure - controlling everything from traffic to utilities such as water and power.
But it also means vast amounts of data will be collected about people's movement and activity.
Done in the right way, the GCHQ chief argues this presents a "fantastic opportunity" to increase efficiency and improve services.
But he warned it also carries risks around privacy and anonymity.
"If we don't control the technology, if we don't understand the security required to implement those effectively, then we'll end up with an environment or technology ecosystem where the data is not only used to navigate, but it could be used to track us".
China is a leading supplier of smart city technology, with councils in the UK already purchasing cameras from its companies.
Mr Fleming said it was vital to ensure all the technologies were not from one place and to understand how data was being processed.
There were only a relatively small number of areas where the UK would need to completely control a technology, he said, and more broadly working with allies would be essential to shape international standards and to defend itself in cyberspace.
At home, the UK has to invest in skills and innovation.
The UK should not be "fatalistic", he said, and had a "very strong track record" of meeting technology challenges.