COPIAGUE - Long Island’s great knish crisis is nearly over.

Gabila’s Knishes typically produces millions of square knishes a year. A fire at Gabila’s Copiague factory in September damaged the company’s knish-making machine, halting production and leading to a nationwide shortage of square knishes.

Gabila’s tells News 12 it has just received a new custom-made machine and is waiting for the fire marshal to approve it.

The company hopes to resume knish production by the middle of the week.