Hackers responsible for causing widespread disruption to the Irish health system have unexpectedly gifted it with the tool to help it recover.
The Conti ransomware group was reportedly asking the health service for $20m (£14m) to restore services after the “catastrophic hack”.
But now the criminals have handed over the software tool for free.
The Irish government says it is testing the tool and insists it did not, and would not, be paying the hackers.
Taoiseach (Irish prime minister) Micheál Martin said on Friday evening that getting the software tool was good, but that enormous work is still required to rebuild the system overall.
Conti is still threatening to publish or sell data it has stolen unless a ransom is paid.
On its darknet website, it told the Health Service Executive (HSE), which runs Ireland’s healthcare system, that “we are providing the decryption tool for your network for free”.
“But you should understand that we will sell or publish a lot of private data if you will not connect us and try to resolve the situation.”
It was unclear why the hackers gave the tool – known as a decryption key – for free, said Health Minister Stephen Donnelly.
“No ransom has been paid by this government directly, indirectly, through any third party or any other way. Nor will any such ransom be paid,” he told Irish broadcaster RTÉ.
“It came as a surprise to us. Our technical team are currently testing the tool. The initial responses are positive.”