Costa Mesa-based Ceradyne Inc. reported a $23.1 million third-quarter loss amid higher operating costs.

That compared with a year-earlier profit of $20.4 million. Wall Street analysts on average had expected a $5.8 million quarterly profit in the most recent quarter.

Ceradyne—which makes ceramics-based body armors and other products for the industrial, defense and commercial industries—said its higher quarterly expenses included costs related to the closure of a solar-crucible manufacturing plant in China.

It also reported more than $2 million in costs tied to the pending sale to 3M Co. in St. Paul, Minn. A shareholder lawsuit contends Ceradyne failed to seek other bids before agreeing to the $860 million deal, announced in October.

Quarterly sales fell 28% from a year earlier to $106.2 million. Officials cited lower shipments in a number of product lines, including body armors, ceramic crucibles and other metal composite products.

Wall Street consensus had forecast $118.2 million in sales for the quarter.

Ceradyne posted a nine-month loss of $12.4 million, compared with $63.1 million in profit a year earlier.

Revenue was off 23% through the first three quarters, to $343.2 million.

Ceradyne shares dropped earlier this week after the company filed a notice to the Securities and Exchange Commission, acknowledging its missing a Nov. 9 filing deadline issuing its financial results. The stock subsequently recovered enough for a market value of $844.6 million by midday Thursday.