Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The Galaxy Note 7 smartphone debacle wiped out more than a third of Samsung Electronics Co.'s quarterly profits, the electronics giant announced Thursday morning in South Korea.

Samsung was forced to recall all of its new flagship Note 7s early last month because faulty batteries led some of the devices to catch fire or even to explode.

Byers Market Newsletter Get breaking news and insider analysis on the rapidly changing world of media and technology right to your inbox. This site is protected by recaptcha

The recall — the biggest in the company's history, and affecting its largest division — drove a company-wide 30 percent collapse in operating profit during the July-September quarter, compared with the same period last year, Samsung said.

The mobile division usually makes up more than half of Samsung's revenue. But operating profit from the mobile division plummeted by 98 percent from a year earlier, to only 100 billion Korean won, or about $87.9 million — barely avoiding the first quarterly loss in the division's history.

Overall, Samsung's third-quarter operating profit was about $4.6 billion. Just a few weeks ago, the company had projected profits of $6.9 billion, but it revised that guidance two weeks ago to roughly where the number officially came in Thursday.

A damaged Samsung Galaxy Note 7 after it caught fire Oct. 9 in Richmond, Va. Shawn L. Minter / AP

Not counting the Note 7, "smartphone shipments remained solid due to continued stable sales of its existing flagship devices, including the Galaxy S7 and S7 Edge," Samsung said. "The mobile business expects a recovery in its earnings to a similar level with that of the fourth quarter of 2015."

But analysts said that's probably not realistic — not after customers were scared off first by horror stories of phones' blowing up in owners' hands and then by Samsung's shipping of fire-proof boxes to return the phones in.

Related: First U.S. Suit Filed Over Exploding Samsung Galaxy Note 7 Smartphones

News about the Note 7 was so bad that some trick-or-treaters have been modeling flaming Note 7 costumes on social media.

The Note 7 recall will continue dampening profits well into next year, when a new Galaxy S model is expected, Lee Do-hoon of CIMB Securities told Bloomberg.

Likewise, Kim Young-woo of SK Securities told Reuters: "I am not positive about Samsung's mobile business until the first quarter."