Shipping company AP Moller-Maersk says it expects the impact of the NotPetya cyber-attack in June to have cost the company $200m-300m, of which the majority relates to lost revenues in July.

Despite this, the company still expects to beat last year’s figure of $711m in terms of underlying profits for the year to the end of December, according to commentary in the second quarter results announcement covering the period to the end of June.

“The main reason for the improvement in result is the underlying fundamentals in container shipping and that is of course very positive for both Maersk Line and APM Terminals,” said CEO Søren Skou during a call with investors.

Maersk Line reported a profit of $339m in the three months to end-June, after four consecutive lossmaking quarters.

“We are recovering from a dire 2016,” said CFO Jakob Stausholm during the call.

On June 27th, Maersk became one of the most high-profile victims of the cyber-attack, which hit about 7,000 companies globally. It was distributed through Ukrainian accounting software called MeDoc, used for filing tax returns in the country.

“The MeDoc software contained back-doors into the networks of users of the software, which were used by the malware to enter via the software's automatic update system,” said the company.

The malware was ringfenced and only impacted on the container -related businesses of Maersk Line, APM Terminals and Damco, said the company – with the vast majority of the impact in Maersk Line.

This meant systems had to be shut down for precautionary measures, as they had global interfaces across businesses and partners.

“While the businesses were significantly affected by this cyber-attack, no data breach or data loss to third parties has occurred,” said the company. Skou added that business and volume levels were back to normal two weeks after the attack.

The other six of the group’s nine businesses, including energy, were able to maintain normal operations, said Maersk.

To put the $200m-300m loss into context, Maersk Line reported revenues of $6.1 billion in the second quarter – up 20% from a year earlier – while the entire transport and logistics division reported revenues of $7.76 billion.

In other news, Maersk expects to close its $4 billion acquisition of Hamburg Süd in the fourth quarter of this year. The deal will add 20% to Maersk Line’s capacity and 26% to revenues, mainly on the north-south trade lanes to Latin America.

This week, the company announced the sale of its Maersk Oil division to Total SA for $7.45 billion in a combined share and debt transaction.