Bryan, Ohio-based Spangler Candy Co. acquired NECCO, the historic candy manufacturer based in Revere, Mass., after bidding $18.83 million at a judge-mandated auction late last Wednesday.

The move prevented a previous attempt by a Boston investment firm to buy the embattled confectionery company. The Spangler purchase was scheduled to close May 25. Long-term plans for NECCO’s production equipment are still undecided.

“Spangler Candy is happy to acquire the assets of NECCO,” said Kirk Vashaw, Spangler’s chairman and ceo. “NECCO candy products have been around for more than 150 years, and share important historical significance with Dum-Dums, candy canes, and other Spangler Candy products.”

The auction process stems from a May 4 filing, when a federal bankruptcy judge greenlighted the bidding process, noting cash bids of at least $13.96 million must have been made before May 18.

The minimum bid was $665,000 higher than a $13.3-million purchase price NECCO and investment firm Gordon Brothers — which has also been involved in the dissolution of Toys ‘R Us — had previously negotiated before the judge opened bidding.

NECCO produces Necco wafers, Mary Jane candies, Clark bars and other items. Federal bankruptcy court documents show two packaging companies and a transport company slapped NECCO with a petition for involuntary Chapter 7 bankruptcy on April 3, alleging the company had not paid debts totaling $1.6 million.

Two weeks later, NECCO filed a request to convert to Chapter 11 bankruptcy, noting it had been working on a potential sale. An affidavit from Threadstone Advisors said NECCO, with help from the advisory firm, sought potential buyers as early as September 2017.

After contacting 45 potential buyers, nine submitted indications of interest. NECCO had selected the bid from Gordon Brothers, and a transaction was reaching the final stages in March when its secured lender, ACAS, LLC, called on the candy manufacturer to repay its debts immediately. As of April 3, NECCO owed ACAS $107 million.

An April 17 filing shows NECCO intended to sell assets to a Delaware-based limited liability company formed in March by CT Corp., a registered agent working on behalf of Gordon Brothers.

Reports of NECCO’s trouble first surfaced in March, when NECCO CEO Michael McGee reportedly told Massachusetts and Revere officials that the company faced laying off 395 employees if it didn’t find a buyer. When the news broke, frenzied fans began snapping up wafers and other NECCO sweets in case the manufacturer ceased operations. spokesperson Clair Robins told Candy Industry that wafer sales jumped 150 percent in April, while sales of all NECCO items grew by 82 percent.

Updated by Bernard Pacyniak, editor-in-chief