New York became the second state to ban discrimination based on natural hairstyles after Gov. Andrew Cuomo signed a bill Friday amending the state’s Human Rights Law.

The measure, which also amends the Dignity for All Students Act, updates the definition of race used in existing law, adding "traits historically associated with race, including, but not limited to, hair texture and protective hairstyles."

"For much of our nation's history, people of color — particularly women — have been marginalized and discriminated against simply because of their hair style or texture," Cuomo said in a statement Friday. "By signing this bill into law, we are taking an important step toward correcting that history and ensuring people of color are protected from all forms of discrimination."

The bill's provisions are effective immediately. The New York City Commission on Human Rights issued new guidance in February that banned discrimination on the basis of hair or hairstyle in workplaces, schools and public places.

New York joined California, which earlier this month became the first state to outlaw racial discrimination based on hairstyle, such as braids, Bantu knots, twists and locs.

The California measure, known as the Crown Act — an acronym for “Create a Respectful and Open Workplace for Natural Hair” — passed unanimously in both the California Assembly and Senate and takes effect Jan. 1. It adds traits historically associated with race to the state’s list of classifications protected from discrimination, including race, sex, religion, color, national origin, disability and sexual orientation.

Civil rights advocates say both the California and New York laws will prohibit grooming policies that place undue burden on people of color, particularly black people.

"Policies and practices that target, profile, or single out people for natural hair styles in public places —like in the workplace, in schools, and even at the airport — disproportionately burden black people," Patricia Okonta, a legal fellow at the NAACP Legal Defense and Educational Fund, told NBC News on Monday.

"At a time where there is a proliferation of people, particularly black women, embracing their natural textures and styles, it is significant that New York lawmakers are working to ensure equal access to resources and opportunities regardless of race or hair texture," Okonta said.

New York Assemblywoman Tremaine S. Wright, who co-sponsored the bill, has worn her hair natural for 17 years. She said in a statement the bill is deeply personal and is one she is proud of.

Assembly Speaker Carl Heastie said discriminatory hair policies sideline people of color.

"No one should face discrimination at school or in the workplace, but too often we see people of color, particularly women, who are told their hair is unprofessional or not appropriate in public settings," Heastie said. "These discriminatory policies sideline people of color⁠ — keeping children out of their classrooms and diminishing who they are."

Rules on natural hair at school and work gained renewed interest in December, when a black high school wrestler in New Jersey was told by a referee that he had to cut off his dreadlocks or forfeit a wrestling match. The incident was caught on video and went viral.

California’s governor cited the video as a clear example of the discrimination black Americans face.

“That is played out in workplaces, it’s played out in schools — not just athletic competitions and settings — every single day all across America in ways subtle and overt," Newsom said before signing the bill at the Capitol in Sacramento on July 3.