Coop Sweden says it closed more than half of its 800 stores on Friday after point-of-sale tills and self-service checkouts stopped working.
The supermarket was not itself targeted by hackers - but is one of a growing number of organizations affected by an attack on a large software supplier the company uses indirectly.
Cyber researchers say about 200 businesses have been hit by this "colossal" ransomware attack, which had mainly affected the US.
Cyber-security firm Huntress Labs said the hack targeted Florida-based IT company Kaseya before spreading through corporate networks that use its software. The firm believes the Russia-linked REvil ransomware gang was responsible.
Kaseya said in a statement on its own website that it was investigating a "potential attack."