A computer virus crippled one of Apple's major suppliers over the weekend.
Taiwan-based chip manufacturer TSMC warned that the infection, which was eventually contained, will delay shipments of its products and could wipe as much as $171 million off its revenue.
The virus hit the company's computer network late Friday and spread to machines used to make chips and processors, TSMC said in a press conference on Monday.
TSMC said the virus caused equipment to crash or repeatedly reboot and was a variant of WannaCry, which targeted more than 300,000 computers in 150 countries last year.
TSMC blamed the infection of its computer systems on "misoperation during the software installation process" for new equipment.
The equipment in question was "not first isolated and confirmed to be virus-free," the company said, allowing the virus to enter as soon as the equipment was connected to the company network.
The virus was stored in the equipment and didn't come from a hack or cyberattack, a spokeswoman for TSMC said.
The company added that its primary computer systems that store production and customer data were not affected, and no confidential information was compromised.
TSMC, short for Taiwan Semiconductor Manufacturing Company, is the main manufacturer of processors for Apple's iPhones and iPads. It's also the world's largest maker of made-to-order chips, which involves manufacturing products designed by companies like Qualcomm and Nvidia.
TSMC spent the weekend scrambling to get its operations back to normal. Most of the affected systems were up and running again by Sunday afternoon, and the company said they were fully recovered Monday
It plans to give customers details in the coming days on when they can expect to receive the delayed shipments.
TSMC said Monday that the disruption is expected to knock 2% off its third-quarter revenue, which it had previously forecast would be in the range of $8.45 billion and $8.55 billion.
The manufacturer said it's confident it will make up for the delayed shipments in the following quarter.
It added that it has "taken actions to close this security gap and further strengthen security measures."
Shares in TSMC in Taipei closed 0.6% lower on Monday.