Hawaii lawmakers passed a bill today banning the sale of sunscreens containing chemicals believed to be harmful to coral reefs.

If Gov. David Ige signs the bill into law, it will take effect Jan. 1, 2021 and make Hawaii the first state in the nation to enact such a law.

Senate Bill 2571, introduced by state Sen. Mike Gabbard (D, Kapolei-­Makakilo), prohibits the sale and distribution of over-the-counter sunscreens containing oxybenzone and octinoxate in Hawaii. The bill was up for House and Senate floor votes today.

Despite opposition from retail and health industry representatives, the Senate voted for the bill unanimously, while four members of the House — Rep. Isaac Choy, Rep. Sharon Har, Rep. Sam Kong and Rep. Bob McDermott — voted against it.

“Amazingly, this is a first-in-the-world law,” said Gabbard in an e-mail. “So, Hawaii is definitely on the cutting edge by banning these dangerous chemicals in sunscreens. When you think about it, our island paradise, surrounded by coral reefs, is the perfect place to set the gold standard for the world to follow. This will make a huge difference in protecting our coral reefs, marine life, and human health.”

The bill was supported by the Friends of Hanauma Bay, Sustainable Coastlines Hawaii, Surfrider Foundation and a number of nonprofit environmental groups, as well as the Office of Hawaiian Affairs. It was opposed by ABC Stores, the Hawaii Medical Association, Hawaii Food Industry Association, Chamber of Commerce Hawaii and Personal Care Products Council, as well as Bayer, which manufactures Coppertone sunscreens.