Several Israeli hospitals were hit overnight by a large cyberattack, officials said Thursday, adding that the hackers were foiled before they could inflict damage on the computer networks.

The attack was apparently the same ransomware virus to affect computers worldwide this week, according to Israeli financial daily Calcalist.

The event was dealt with “immediately” and no damage was caused, the National Cyber Authority said in a statement, without revealing the names of the institutions attacked.

The hack, which occurred on the night between Wednesday and Thursday, infected a number of computers but was dealt with immediately by IT security officials at the sites, the Prime Minister’s Office said in a statement.

Developments are being closely monitored, and the hospitals have continued running as usual, the statement said.

The latest attack comes as top global cybersecurity officials, gathered in Tel Aviv for the annual Cyber Week conference, were warning that hackers are winning the battle in the cyber war, as more and more devices come online and as protections remain painfully inadequate.

Israel was thought to be largely spared by the latest global wave of cyberattacks that began in Russia and Ukraine on Tuesday, which wreaked havoc on government and corporate computer systems as it spread around the world.

But Calcalist said the ransomware detected in the hospitals and at other businesses in Israel was part of the same one that affected computer systems globally earlier this week. Among the entities affected in Israel were hospitals in the north of Israel, the Israeli offices of shipping company Maersk, the pharma company Merck and other small and medium-sized offices, Calcalist said.

Prime Minister Benjamin Netanyahu said earlier this week that every month Israel experiences dozens of cyberattacks at a national level, and at any given moment there are probably three to five attacks on a national level that emanate from various sources.