Hotel employees in Chicago who work alone now have panic buttons as a safety feature as a new law took effect Sunday, WGN reported.

An ordinance passed by the Chicago City Council in October made it mandatory for hotels to supply portable panic buttons for workers who "clean, inventory, inspect or restock supplies" while alone in guest rooms or restrooms, the Chicago Sun-Times reported.

The law is part of an effort by city officials to prevent workers from being sexually harassed. According to a 2016 Unite Here survey, 58 percent of employees said they were sexually harassed while working at hotels, particularly at night, WGN reported. Karen Kent of the Chicago chapter of Unite Here, told WLS that 49 percent of hotel workers surveyed said they had seen a guest naked or had a guest flash them.

The rule applies to union and non-union employees, the television station reported. Other cities, including New York, Seattle and Washington, also have a law that requires panic buttons, WLS reported.

One hotel worker, identified as Roushaunda, told the Sun-Times that the new law marks "a culmination of a lot of hard work."

“Today’s the day we say no more,” she said. “Today’s the day we claim our space. ... We will feel protected.”