SAN FRANCISCO -- SanDisk ( SNDK) posted a greater-than-expected loss in the third quarter, as prices for its flash memory chips plunged 30% quarter over quarter.

The Milpitas, Calif., chipmaker managed to outpace Wall Street's lackluster sales expectations, delivering $821 million in revenue, vs. the $778 million expected by Wall Street analysts. At this time last year, SanDisk had sales of $1.04 billion.

With the market for NAND flash memory chips awash in oversupply, and prices for the chips under severe pressure, SanDisk was forced to sell its chips markedly below its own production costs.

The company said its product gross margin in the third quarter was negative 20%, compared to 3.3% in the second quarter, and 24.3% at this time last year.

SanDisk reported a net loss of $155.2 million, or 69 cents a share, vs. net income of 84.6 million, or 36 cents a share in the year-ago period.

Excluding stock compensation expenses and other charges, SanDisk said it lost 59 cents a share. The average analyst expectation called for SanDisk to lose 27 cents a share, according to Thomson Reuters.

The company's results included $109 million in inventory-related charges.

Shares of SanDisk were down 36 cents, or 2.5%, to $14.06 in after-hours trading on Monday.

SanDisk's financial report follows a separate announcement by the company earlier Monday in which it said that Toshiba was buying 30% of its manufacturing capacity at a pair of chip factories that the two firms jointly own.

The move will reduce SanDisk's capital expenditures burden amid one of the most serious downturns that the flash business has experienced, and one which has punished virtually all the players.

Earlier this month, Micron ( MU)announced it was shutting down one of its three manufacturing lines for NAND flash memory, and slashing 15% of its workforce, as the company seeks to ride out the downturn. Intel ( INTC), which is a joint-venture partner with Micron in the flash memory business, announced plans to take a $250 million charge as a result of the move.

SanDisk's results also come as the company seeks to fend off an unsolicited aquisisiton offer by Samsung, the South Korean consumer electronics conglomerate that is also the world's No.1 maker of NAND flash memory.

SanDisk has rebuffed Samsung's offer of $26 a share for the company, saying it is an attempt to takeover the company while its stock trades at its cyclical low point.

SanDisk did not immediately provide a financial outlook for the fourth quarter, but the company is scheduled to hold a conference call with analysts discussing its results later Monday.

More from Technology

Flashback Friday: Amazon, Chip Stocks, Memorial Day

Flashback Friday: Amazon, Chip Stocks, Memorial Day

Some Companies Are Already Feeling the Effect of GDPR

Some Companies Are Already Feeling the Effect of GDPR

Experts Break Down GDPR Risks for Investors

Experts Break Down GDPR Risks for Investors

Netflix Ready to Surpass Disney as America's Most Valuable Media Company

Netflix Ready to Surpass Disney as America's Most Valuable Media Company

60 Seconds: What the Heck is GDPR?

60 Seconds: What the Heck is GDPR?