The EU is to impose tough sanctions on those who launch cyberattacks, be it to attack infrastructure, obtain sensitive corporate information or influence elections.
"The Council (of EU countries) established a framework which allows the EU to impose targeted restrictive measures to deter and respond to cyberattacks," the council said in a statement issued Friday.
Among the measures are asset freezes and travel bans, which can also be imposed for attempted attacks.
Under the legislation, diplomats said, the 28 EU countries would have to vote unanimously to impose sanctions if the attack is deemed to have "significant impact."
The European Council said it was "concerned at the rise of malicious behavior in cyberspace that aims at undermining the EU's integrity and security and economic competitiveness, with the eventual risk of conflict."
UK: Russia 'take heed'
The UK's Foreign Office called the new measures "decisive action," adding that "the international community will take all necessary steps to uphold the rule of law and the rules-based international system which keeps our societies safe."
Foreign Secretary Jeremy Hunt went as far as addressing Russia, which has been accused by several Western nations of meddling in elections through targeted trolling operations, directly by saying "Russia please note and take heed."