CYBER attacks risk turning elections into “tainted exercises” which rob elected governments of their legitimacy, Jeremy Hunt will warn today.

The Foreign Secretary will insist authoritarian regimes now possess ways of undermining free societies “that yesterday’s dictators would have envied”.

It comes as he is due to outline a new “doctrine of deterrence” during a speech at the University of Glasgow, aimed at targeting those who carry out mass cryber attacks.

This will ensure perpetrators “believe they run a credible risk of additional counter-measures – economic and diplomatic - over and above public embarrassment”, he said.

It follows a slew of high-profile incidents such as the Wannacry ransomware attack in 2017, which targeted computers running Microsoft Windows.

Hospitals across the UK were hit by the cyber assault, with tens of thousands of devices including MRI scanners, blood-storage refrigerators and theatre equipment affected.

Mr Hunt will insist the UK Government “will always seek to discover which state or other actor was behind any malign cyber activity, overcoming any efforts to conceal their tracks”.

Those who carry out cyber crimes will be prosecuted, he will warn, while the UK has already conducted operations designed to hinder IS in the Middle East – and cripple its online propaganda.

Mr Hunt will argue trust in democracy is undermined by cyber interference, while elections even risk becoming “tainted”.

He will say: “The freedom to pass judgement on your leaders and change your government peacefully, through the ballot box, is the defining quality of a liberal democracy.

“Millions of people have made immense sacrifices for the sake of that essential liberty.

“Events have demonstrated how our adversaries regard free elections – and the very openness of a democratic system – as key vulnerabilities to be exploited.

“Authoritarian regimes possess ways of undermining free societies that yesterday’s dictators would have envied.”

“For every example of publicly attributed interference, there have been others that never saw the light of day. The implications are profoundly disturbing.

“At a minimum, trust in the democratic process is seriously undermined.

“But in a worst case scenario, elections could become tainted exercises, robbing the Governments they produce of legitimacy.”

The UK Government is investing £1.9 billion through its National Cyber Security Strategy.