NEW YORK — Enriqueta Luna was an undocumented worker when her employer, a New York City restaurant owner, pulled down his pants and threatened her, and she knew that reporting the crime could get her deported to Mexico.

“At the time, what I did more than anything was cry,” Luna says of the experience, speaking though an interpreter.

With some gumption and good luck, however, Luna became one of a select few who obtained special legal certification that can allow undocumented victims of crimes and human trafficking to remain in the United States while their cases are investigated.

Now in a nationwide precedent, New York City’s Commission on Human Rights will be issuing that same certification, the first anti-discrimination agency in a major U.S. city to do so.

Under the new system, undocumented victims of crimes such as sexual assault or human trafficking can seek legal certification from the Commission which they in turn can submit to the U.S. federal government to apply for a specialized visa.

The U.S. government issues up to 15,000 visas designated for crime and trafficking victims each year.

While the numbers of available visas for victims may be small, considering an estimated 535,0000 undocumented immigrants live in New York City alone, the move is intended to send a wider message, authorities said.

“Immigrant New Yorkers should never have to fear negative immigration consequences for reporting crimes committed against them, especially survivors of human trafficking,” said Council Speaker Melissa Mark-Viverito in a statement.

Luna, a 51-year-old widow with three adult children and seven grandchildren, told the Thomson Reuters Foundation in an interview that she is relieved other people in situations like hers now have options for redress.

In her case, it was four years ago when the restaurant owner yanked down his trousers and demanded to have sex with her.

The owner’s wife struck her and told her she had provoked the attack and deserved the consequences, she recalled.

“She said to me, ‘You’re just an immigrant beggar and no one is going to help you,'” said Luna.

Luna found her way to state labor officials and a non-profit legal group, Make the Road New York, helped her obtain the victim certification that she submitted to the U.S. government.

She now works as a housekeeper, and her U.S. visa application is pending. A federal civil complaint was filed against the restaurant in 2013.

Before the New York City’s Commission on Human Rights decision, certifications such as Luna’s needed to be obtained through police, prosecutors or city protection agencies.

The Commission investigates and prosecutes discrimination in the workplace, housing and public accommodations. Similar anti-discrimination agencies in other large U.S. cities do not provide the same visa certification, a spokesman said.

Undocumented immigrants often do not report crimes for fear of deportation, said Maya Wiley, chief legal advisor to New York City Mayor Bill de Blasio.

“They should know that the law protects them just as it protects everyone else,” she said.

Some 11.3 million undocumented immigrants live in the United States, according to city officials. Government statistics suggest that as many as 17,500 foreign nationals are trafficked into the United States each year.

The U.S. Congress created the visas in 2000 to protect victims of trafficking and violence, encourage undocumented immigrants to report crimes and assist law enforcement in investigations and prosecutions.