COLUMBIA, S.C. — A bill to prevent local governments in South Carolina from passing their own plastic bags ban is one step closer to becoming law.

The Senate Labor, Commerce and Industry Committee voted in favor of the bill Thursday to prevent cities and towns from banning the use of plastic bags for carrying food and other merchandise. The legislation comes after several towns along the South Carolina coast like Folly Beach and Mount Pleasant banned stores from using plastic bags.

Senate Majority Leader Shane Massey of Edgefield said the state has a littering problem and municipalities have the authority to prohibit plastics at the beach or at a park, but said a patchwork of bag bans would be hard on businesses following one set of rules in Columbia and another in Mount Pleasant.

Critics said state lawmakers aren’t allowing local governments to decide for themselves whether plastic bags are bad for their communities.

“I wonder about the message it sends to people who want to get together on a local level and engage in a civic way and the General Assembly wipes it away,” said Sen. Tom Davis, who opposes the bill. Davis said areas across the state have different needs, and state lawmakers should not intervene and alienate the people who are taking an active role in their local government.

“It’s a direct attack on home rule,” Davis said.

The Beaufort Republican said lawmakers need to be careful about intervening with decisions made by local governments.

An advocacy group based in the Lowcountry said the bill is a rejection of local rights and the will of the people.

“Local communities are effectively tackling plastic pollution with local bans. They’re making good progress,” said Emily Cedzo, director of the Land, Water and Wildlife Program, in statement released Thursday.

The bill would allow towns that imposed bans before Jan. 31 to keep them.

The bill passed the House in February.