Maine Gov. Janet Mills has enacted a bill making her state the first to ban single-use food and drink containers made from polystyrene foam.

The legislation, which Mills signed into law Tuesday, will take effect in 2021. It prohibits so-called "covered establishments" — like restaurants and grocery stores — from using the containers. Exempted are hospitals, seafood shippers and state-funded meals-on-wheels programs.

Mills, a Democrat, called the new law an "important step forward in protecting our environment." The governor said it creates consistency for businesses while providing time to adjust.

Environmental groups have sought such bans amid rising public awareness of throwaway plastic accumulating in the oceans.

"With the threats posed by plastic pollution becoming more apparent, costly, and even deadly to wildlife, we need to be doing everything possible to limit our use and better manage our single-use plastics — starting with eliminating the use of unnecessary forms like plastic foam," said Sarah Lakeman, Sustainable Maine director at the Natural Resources Council of Maine.

Similar legislation passed Maryland's Legislature in April, but it's unclear whether that state's Republican governor, Larry Hogan, will sign it. Oregon, Vermont and Connecticut are also considering banning the containers, and dozens of communities from Berkeley, Calif., to New York City have passed their own bans, some of which date back to the late 1980s.

BERKELEY FOLLOWS PLASTIC STRAW BAN BY CHARGING DINERS AN EXTRA QUARTER FOR DISPOSABLE CUPS

Maine has banned foam food containers at state facilities and functions since 1993 and some communities in the state had already banned polystyrene.

The legislation faced strong opposition from the plastics industry, food service container manufacturers and Maine business and tourism groups, which argued that polystyrene is economical and better than other materials at keeping food from spoiling.

"It is our sincere hope that Governor Mills and the Maine Legislature will reconsider this legislation next year after they see how it will negatively impact the environment and local businesses and consumers," said Omar Terrie, a director in the American Chemistry Council's plastics division.

CLICK HERE TO GET THE FOX NEWS APP

The plastics industry also says it's taking voluntary steps to make plastic packaging reusable, recyclable or recoverable by 2030. Several companies, such as Dunkin' and McDonald's, have eliminated foam cups or pledged to do so.

Maine State Chamber of Commerce lobbyist Ben Gilman said the bill would raise costs for small businesses while sending a "chilling message" to companies in the state that manufacture food service containers.

"These types of issues are better dealt with on a regional or national basis due to unbalanced cost impact it will have on Maine businesses," he said in written testimony.