Factory output unexpectedly rose the most since December on production of parts for devices including Apple Inc.'s iPhone, providing a bright spot in an economy poised to shrink for a second straight quarter, the Ministry of Economy, Trade and Industry said Friday.

Industrial production in October increased 1.8 percent from the previous month, when it dropped 4.1 percent, METI said. That compares with economist estimates for a 2 percent fall. Production of electronic parts and devices rose 14.7 percent from September, the biggest advance since at least 1998, the ministry said.

The report underscores how reliant Japan's electronics industry has become on variations of the iPhone, the newest of which sold 2 million units in first-day orders, in an economy at risk of recession from a contraction in Europe and a diplomatic dispute with China. The latest version of the device, introduced Sept. 21, may have also boosted South Korean industrial production, Friday data showed.