For 67 years, the Maine Lobster Festival didn’t collect sales taxes because of its nonprofit status. On Monday, the popular Rockland-based festival admitted it was wrong.

WCSH-TV quoted former festival President Chuck Kruger as saying the festival discovered last year that it needed to collect state sales taxes on souvenirs and food.

Food is a huge part of the five-day festival, which is held each year at Rockland’s Harbor Park. During the 2015 festival – held in late July and early August – the festival cooked and served over 17,000 pounds of lobster. In addition, the festival served steamed and fried clams, fried Maine shrimp, shrimp cocktail and steamed mussels.

Kruger told the Portland TV station that the festival discovered the error when it changed accountants and accounting software. After discovering the error, the festival contacted a tax attorney, who in turn notified Maine Revenue Services, the state’s tax agency. The state and the festival reached an agreement that will allow it to repay three years’ worth of sales taxes and interest while waiving penalties and interest.

The festival donates a portion of its annual revenues to local charities and municipal projects. The festival this year began charging 5.5 percent on souvenirs and 8 percent on food.

Thousands of people from Maine and around the country attend the festival. The first festival was held in 1947 and was called the Camden-Rockport Lobster Festival.