LEBANON, N.H. (CBS Local) — A nightmare at a checkout stand turned into a rare and unexpected windfall for food shoppers in New Hampshire thanks to a computer glitch.

The cash registers at Hannaford supermarket in West Lebanon started to fail around 11 a.m. Monday, said store manager Shawn Quelch.

“I see a line, a single line, at least 50 people deep,” Lebanon resident Stevens Blanchard told WPTZ. “I’m thinking, do I just leave my basket here and like get back to work?”

Would the store turn customers away or make them wait?

A nightmare at a checkout line turned into a rare and unexpected windfall for food shoppers in New Hampshire thanks to a computer glitch. (Credit: WPTZ/CNN)

Quelch said he consulted with company officials and they agreed to let people stuck in line take their goods home free of charge.

“The last thing we wanted was for our customers to be waiting for the hour that it was going to take for that to come back up,” he said. “So we kind of made the decision to just let those folks have the groceries they had selected and be on their way.”

Quelch estimates the store gave away between $3,000 and $5,000 in product.

“Hannaford just took the worst shopping experience I’ve ever had and made it into one of the best,” Blanchard said.