While experts can not definitively say where that attack originated, information hidden in the code used to run in pointed to the involvement of North Korea.
Legal Week says the firm was "hit by a major cyber attack".
A Maersk representative told AFP that company systems are "down across all business units due to a virus".
"We confirm our company's computer network was compromised today as part of global hack", it said on Twitter.
In either case, experts warn that it could spread globally, raising fears of a widespread attack like the WannaCry outbreak that struck in May.
The ransomware tells victims that they must pay the equivalent of $300 in Bitcoin in order to receive the decryption key to unlock their files.
While the malware's most concentrated effects were reported in Ukraine, several companies and at least one utility in Russian Federation were also reportedly affected. The threat can be similar to the massive "Wannacry" attack as it may hit companies, schools and hospitals, according to cyber security experts.
Microsoft said it is investigating the matter.
The fight against cyberattacks has sparked exponential growth in global protection spending, with the cyber security market estimated at $120 billion this year, more than 30 times its size just over a decade ago.
Moscow-based cyber security firm Group IB said hackers had exploited code developed by the US National Security Agency which was leaked and then used in the WannaCry ransomware attack that caused global disruption in May. "We stand ready to support any requests for assistance".
Sean Sullivan, a researcher at the Finnish cybersecurity group F-Secure, said the attack "seems to be done by professional criminals", with money as the motivation. In Russia, the malware hit companies such as Mars, Nivea and Mondelez International, according to the Tass news agency.
Ukraine's delivery service company Nova Poshta confirmed the virus that hit its computers was Petya.A.
Officials at that country's postal service and metro system in Kiev also reported hacking problems.
Ukrainian Deputy Prime Minister Pavlo Rozenko on June 27 posted a picture of a darkened computer screen to Twitter, saying that the computer system at the government's headquarters has been shut down.
The Chernobyl nuclear power plant, where a huge meltdown occurred in 1986, has had its radiation monitoring equipment knocked out by the mass cyberattack sweeping Ukraine, though most other systems are functioning as normal.