Taiwan Semiconductor Manufacturing Co., which makes chips for the iPhone and other devices, is recovering from a debilitating computer virus but warned of delayed shipments and reduced revenue because of the impact on its factories.

TSMC said that 80 percent of the fabrication tools affected by a virus outbreak Friday evening had been restored and that it expects full recovery on Monday. The Taiwanese company said the incident, which comes as it ramps up chipmaking for Apple Inc.’s next iPhones, would delay shipments, without specifying which customers would be affected. Its shares fell more than 1 percent in Taipei.

Taiwan’s largest company blamed the infection on a mistake made during software installation that then spread through its network. The chipmaker estimated that third-quarter revenue would be cut by about 3 percent from a previously forecast $8.45 billion to $8.55 billion, while gross margin would slip by about 1 percentage point. It maintained its 2018 forecast of boosting revenue by high single digits in U.S. dollar terms.

The incident underscores the global nature of the technology supply chain, in which companies like Apple and Qualcomm Inc. depend on hundreds of suppliers around the world. This is the first time a virus had ever brought down a TSMC facility, recalling the WannaCry cyberattacks of 2017 that forced corporations around the world to suspend operations as they rooted out the ransomware. TSMC says no confidential information was compromised in the virus attack and most customers have been notified.

Mark Li, an analyst at Sanford C. Bernstein, said he thinks all of TSMC’s 12-inch wafer fabrication plants had been infected and that many customers had been affected, though the impact will be “very limited” because the company can make up for the losses during the busiest holiday quarter. TSMC makes Apple chips in its 12-inch fabrication plants.

“Long-term, TSMC’s trustworthy image is somewhat tainted but it is hard to quantify the effect now,” Li wrote in a research note Monday.

The firm is the latest to fall prey to a growing global scourge. Cyber crime could cost businesses as much as $8 trillion in damage over the next five years, according to the World Economic Forum.

“TSMC has taken actions to close this security gap and further strengthen security measures,” Chief Financial Officer Lora Ho said by phone Sunday.

The implications are unclear for Apple. The iPhone maker last week surpassed a market value of $1 trillion, largely on the strength of sales for its pioneering smartphone.

Still, TSMC’s statement that the virus will affect shipments comes at a sensitive time for Apple, which is TSMC’s largest customer and accounts for more than 21 percent of its revenue, according to data compiled by Bloomberg. Apple designs the processors that go into its devices, but it uses TSMC as its exclusive partner for producing the chips. In the past, the U.S. company has employed foundries owned by Samsung Electronics Co., its rival in global mobile devices.

Apple is said to be ramping up production of three new iPhone models for this fall, banking on them to continue its recent sales momentum. It’s also planning new iPad and Apple Watch models, devices that have historically also used chips produced by TSMC. While TSMC has not indicated which customers could be affected, such a virus could potentially slow Apple’s output of new devices, cutting into the number of units sold.

Apple does prepare for last minute supply-chain hiccups like the one facing TSMC and could work through any potential problems. An Apple spokesperson didn’t immediately respond to a request for comment on Sunday.

“If the most advanced 7nm process products suffer a major impact, then concern could arise over a potential launch delay for next-gen iPhones,” SMBC Nikko analysts wrote on Monday.

While Qualcomm, which provides processors for many devices running Android software, gives TSMC about 6 percent of its revenues, it diversifies production so that some chips are built by competitors like Samsung. Huawei Technologies Co., MediaTek Inc., Nvidia Corp., and Texas Instruments Inc. also rely on TSMC to produce chip designs.

The incident comes weeks after TSMC cheered investors with a rosy outlook for smartphone demand in the latter half of the year. That helped the market look past a reduced revenue outlook. A bellwether for the chip industry as well as an early indicator of iPhone demand, it heads into its busiest quarters grappling with waning enthusiasm for the high-powered chips used to mine digital currencies. Chief Executive Officer C. C. Wei had said TSMC’s sales will rise this year by a high single-digit percentage in U.S. dollar terms, down from an already reduced projection of about 10 percent.

The virus outbreak was due to “misoperation” during the software installation process for a new tool, the company said in the statement. The virus then spread once the tool was connected to TSMC’s computer network.

“TSMC has been attacked by viruses before, but this is the first time a virus attack has affected our production lines,” Ho told Bloomberg News on Saturday.