NEW YORK — A regulation that ensures people visiting New York City facilities can use restrooms or locker rooms aligned with their gender identity was enacted Monday.

Mayor Bill de Blasio, a Democrat, signed an executive order that guarantees people access to single-sex facilities consistent with their gender identity at city facilities, including offices, pools and recreation centers, without the need to show identification or any other proof of gender. The move comes amid a continuing national debate over anti-discrimination laws.

“Access to bathrooms and other single-sex facilities is a fundamental human right that should not be restricted or denied to any individual,” de Blasio said. “Every New Yorker should feel safe in our city – and this starts with our city’s buildings.”

The order says the regulations apply to all city-owned buildings, including city offices, public parks, playgrounds, pools, recreation centers and certain museums.

It doesn’t require agencies to build new single-stall restroom or locker room facilities, but instead enforces that all individuals, including those who are transgender or gender non-conforming, are free to use single-sex facilities consistent with their gender identity, city officials said.