BOSTON — A man who helped the ringleader in the Hannaford credit card theft case has been sentenced to five years in prison.

Prosecutors said Damon Patrick Toey, who lived in Miami and Virginia Beach, Va., sold stolen credit and debit card numbers and used some of them to withdraw money from automated teller machines.

The 25-year-old Toey was sentenced Thursday in U.S. District Court in Boston. He also received a $100,000 fine.

Authorities said Toey worked for Albert Gonzalez, who was sentenced to 20 years in prison last month for stealing millions of credit and debit card numbers from Hannaford Bros., TJX Cos., BJ’s Wholesale Club and other large retailers.

Prosecutors said Toey later gave them information that allowed them to charge Gonzalez and two others.