A transgender woman who claims she was abused while confined in four different men's prisons for more than 17 months will be transferred to a New Jersey women's prison, the American Civil Liberties Union of New Jersey announced Thursday.

The transfer of Sonia Doe, as she's referred to in court documents, is the latest step in ongoing litigation that could have major implications for how transgender inmates are treated in correctional facilities, according to the civil rights group.

"Ms. Doe would be transferred to the women's prison no later than the week of September 15, 2019," the ACLU of N.J. said in a statement.

The decision to move her, made by the New Jersey Department of Corrections, comes two weeks after the ACLU of N.J. and attorney Robyn Gigl of Gluck Walrath LLP filed a lawsuit on Doe's behalf.

In the suit, seen by NBC News, she alleged the NJDOC consistently misgendered her, denied her female commissary items and left her without adequate protection to deal with rampant sexual harassment from other inmates and officers.

Doe, in an affidavit filed in court earlier this month, wrote that though she was assigned male at birth, she has identified as female since she was a child and was diagnosed with gender dysphoria — a medical condition resulting from a conflict between one’s sex assigned at birth and one's gender identity. She was receiving doses of estrogen and testosterone-blocking medication regularly while in prison.

Yet the 40-year-old said that, despite repeatedly telling NJDOC she is a woman, she was "treated" like a man and processed for intake at the Central Reception and Assignment Facility (CRAF) in Trenton along with men.

While at CRAF, Doe alleges that the doctor cut her testosterone-blocking medication in half, thereby causing her to grow facial hair and exacerbating her gender dysphoria.

"It made me uncomfortable in my body and made me feel and look unlike myself," Doe wrote.

When she was transferred to South Woods State Prison in Bridgeton, she said she was fearful of her assigned cellmate, whom she described as "a physically enormous man" and that she was often strip-searched and leered at whenever she'd change clothes.

At Northern State Prison in Newark, New Jersey, another prison she stayed at, Doe said she also survived a brutal physical attack.

"During the whole time of this attack, I did nothing but lie in the fetal position crying and begging them to stop," Doe wrote. "The daily reminders that the NJDOC considers and treats me like a man ... cause me fear, anxiety, depression, humiliation, self-loathing and, at times, even feelings of self-harm."

A spokesman for the NJDOC told NBC News that he could not comment on active litigation, as Doe's case is ongoing. A spokesman for the New Jersey Attorney General’s Office, which is representing corrections officials in the lawsuit, said the agency had no comment.

According to Doe's complaint, she became addicted to painkillers and ended up with a prison sentence “for offenses stemming from her addiction." She has worked as an EMT, a suicide prevention counselor and a bail agent.

Doe's alleged experiences of abuse while held in a facility that was not in accordance with her gender identity is not unique. At least 21 percent of transgender women confined in men's facilities reported suffering physical abuse while in prison, while 20 percent reported sexual violence, according to a national survey by the National Center for Transgender Equality and the National Gay and Lesbian Task Force.

But the ACLU of N.J. wrote in a statement that Doe's transfer to the Edna Mahan Correctional Facility for Women in Clinton, New Jersey, "represents an important first step" in challenging discrimination against transgender prisoners.

"Sonia Doe has spent more than 500 days in men's prisons, facing extreme harassment, discrimination and outright violence on a day-to-day basis," said Tess Borden, an ACLU-N.J. staff attorney. "Her bravery in asserting her rights, and the DOC's quick decision to transfer her to the women's prison, creates momentum for broad-based reforms."

Follow NBC Out on Twitter, Facebook & Instagram