Scarred by stories of guests abusing housekeepers and other staff, the US hotel industry has agreed to distribute so-called “panic buttons” to workers who deal directly with guests, the Associated Press reports.

Marriott, Hilton, Hyatt, IHG, Wyndham, Red Roof Inn, Best Western, Accorhotels, Four Seasons, and Caesar’s are among the chains that will distribute the devices, which vary from hotel to hotel based on factors such as the availability of wifi.

In wired hotels, the device would send an alert immediately to security staff, for example, while in older hotels the device might just emit a loud alarm.

About three-quarters of the 25,000 member hotels of the American Hotel and Lodging Association are taking part in the initiative.

Hotels also are training staff about preventing, recognizing and reporting sexual harassment, as well as sex trafficking.

A survey of Chicago hotel housekeepers conducted in 2016 found that about half had experienced sexual harassment, including guests who exposed themselves or answered the door naked.

The devices have been mandated in New York hotels since 2012, when a maid reported being sexually assaulted by French politician Dominique Strauss-Kahn.

Seattle and Chicago also have laws requiring that hotel staff receive the panic buttons for their own protection.