A Boston city ordinance banning major grocery store chains from providing plastic bags to customers went into effect Friday. The new law – enacted to help reduce pollution and clean up city streets – applies only to checkout bags, described in the ordinance as carryout bags with handles.

Retailers can still stock recyclable paper bags, compostable bags or reusable bags and sell them for at least 5 cents, as long as the charge is advertised near the checkout location, according to the ordinance, signed into law by Mayor Marty Walsh last December.

The plastic bag ban will be rolled out over eight months. For now, it applies only to stores that are 20,000 square feet or larger. Stores that are at least 10,000 square feet have until April 1, 2019, to comply. Smaller establishments have until July 1, 2019.

Offenders will first receive a warning, followed by a $50 fine for a second violation, and $100 fine for a third violation.

Get Breaking News Delivered to Your Inbox

The city says it will perform inspections to ensure compliance.

The ban goes into effect near the height of the hectic holiday season for grocers -- and store managers say they've trained cashiers to explain the policy to customers while maintaining speed of service.

Boston joins more than 80 municipalities that have already banned plastic bags. Only Hawaii and California have statewide bans on plastic bags.