Shoppers were desperately trying to get milk and bread—but ended up with a lot more.
Credit: Getty: Dan Dalton

There's nothing more important than being prepared for a potentially harmful winter storm (our essentials checklist is here, by the way), which is why many shoppers flooded supermarkets over the weekend. It should come as no surprise that some shoppers ran into long lines and traffic outside their favorite grocery store—but it is surprising, however, that a local Hannaford in New Hampshire ended up allowing shoppers to leave the store with hundreds of dollars worth of free food.

The store manager, Shawn Quelch, faced his worst nightmare—the store's cash registers ended up going offline, and all the panicky shoppers had to queue in a massive line. This was already after most of Quelch’s store had been wiped out of product.

Quelch told NBC's Today there was an issue with the store's routers connecting to a server, which became apparent around 11 a.m. last Monday. At first, Quelch tried putting everyone into one line, and had staff immediately hand out free cookies and coupons. But it quickly escalated into one of the biggest grocery store checkout lines we've ever seen.

How to deal with harsh winter weather:

One of the shoppers standing in the ginormous line was Stevens Blanchard, a Lebanon, New Hampshire resident, who took to Facebook to share how dire the situation was.

"The shelves were picked bare to begin with, and now this," Blanchard wrote on his post, which has since racked up 1,000 shares.

Quelch told NBC it was around 2 p.m. when all the registers had gone dark—thinking on his feet, he gave Hannaford's corporate office (a New England chain owned by grocery conglomerate Ahold Delhaize) a quick call. That's when he came up with an idea that has gone viral due in part to local news stories, like this one from an NBC affiliate in Vermont.

"THEN the manager comes out and says, 'Our registers crashed, and rather than have you all wait around the hour or so it will take to fix this, everything is FREE, we will help you bag it,'" Blanchard said in his Facebook post.

Shoppers couldn't believe it—as Blanchard writes, a few of them waited to see if staff would limit their purchases. But they didn’t.

"Wow! Props to the Hannaford staff! They took being in the wrong place at the right time and made it the right place at the right time," Blanchard wrote.

Quelch isn't sure how much free food was given away in the end—if he had to guess, however, he estimates between $3,000 and $5,000 of free food was swiped, according to NBC.

"I've been with Hannaford for 30 years and have never experienced that kind of unique situation," he said. "I always say, 'Our first chance is our best chance to make it right for customers.' And I wanted to do everything in my power to make it right for those customers in line that day."