Vincent Termini Jr. was panicking. As the Christmas season, the busiest time of year for his family’s famous South Philadelphia bakery, got underway, a large piece of equipment in their main bakery had seized. It just stopped.

This wasn’t just any machine. The “dough breaker” is an 80-year-old piece of specialty equipment straight from Italy that’s a critical component in the process of making cannoli, by-far the most popular item at Termini Bros. during the holidays. That key step in the process meant production of cannoli was halted the Monday after Thanksgiving, mere weeks before Christmas Eve, when the bakery is set to celebrate its 100th year in business in Philadelphia.

“Oh my God,” Termini said Sunday, breathlessly recalling the swift dwindling in the bakery’s supply of cannoli shells. “I was beyond freaking out.”

As tradition goes, generations of South Philadelphians start lining up just after midnight on Dec. 24 and listen to live music, awaiting the moment when Vincent Termini Sr., now 83, flings open the doors at 6 a.m. and welcomes customers inside to purchase biscotti and boxes of Italian cookies.

Most importantly, they come for the cannoli.

Once the machine froze up, the younger Termini and his brother spent every day attempting to find a way to fix or replace it in time for its busiest few weeks of the year. A mechanic evaluated the machine and found that a pin that held its shaft in place had broken off, and the shaft split. A replacement part would probably take months to come in.

The owner of Tallutos, an Italian Market pasta shop, offered up one of his own pieces of equipment that rolls dough into sheets, but Termini said the machine was too small and wasn’t quite right for making cannoli.

In the meantime, the treats were still flying off the shelves, and the bakery was shipping them across the country. Termini said they sell thousands of cannoli over an average weekend in December, and last week were down to less than 1,000 shells. They needed a miracle.

Termini said he called Sander Supply, a Philadelphia-based industrial equipment supplier that Termini has worked with for decades. They couldn’t fix it themselves — so the Sander owners drove around the city to other machine shops, trying to find someone who could.

Two different shops worked on the problem through last week, and by Friday morning, Termini got the call: Thanks to Port Richmond Tool & Die — which had a special part on hand and found a way to get the machine back into working condition — the dough breaker was running again.

“It really is like a miracle,” Termini said. “I don’t know what we would have done, to be honest. I can’t imagine telling people, ‘We don’t have cannolis.’ ”

For the first few weeks of the debacle, they didn’t. Vincent Termini Jr. and his brother Joseph elected to keep the problem close to the vest — they didn’t even tell their father because “he would have freaked out.” They let him know when it was all over that Christmas had been saved.

And so Vincent Termini Sr., who hasn’t been back to the bakery since the pandemic began, will return for the first time in the wee hours of the morning on Christmas Eve.

He’ll swing open the doors, revealing to the dozens of people waiting in the cold, that inside is a warm, decorated bakery filled with cookies, cakes, and most importantly, cannoli.