Maine has banned single-use food and drink containers made from polystyrene foam, commonly known as Styrofoam, becoming the first state to do so.

Democratic Gov. Janet Mills signed the bill, which takes effect in 2021, into law Tuesday.

Environmental groups have sought such bans amid rising public awareness of throwaway plastic that accumulates in the oceans, but the Natural Resources Council of Maine said that Maine is the first state to enact a ban.

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, California, to New York City have already passed their own bans, some of which date back to the late 1980s. Several companies such as Dunkin’ and McDonald’s have also pledged to or have already eliminated foam cups.

In December, European Union officials agreed to ban some single-use plastics, such as polystyrene food and beverage containers, in an effort to curb marine pollution.