Estrella Sanchez, a transgender woman who drew national media attention after fleeing persecution in her Mexican homeland, was granted asylum by an immigration judge in Georgia this week after a six-year legal battle.

“I came here looking for protection, security and safety,” said Sanchez, 31, who will now be eligible to apply for a green card in a year. “In my country, I don’t have the same protections.”

RELATED: Transgender woman draws national attention for Georgia prison lawsuit

Denied three times by an immigration judge based in Georgia, Sanchez’s case rose to the 11th Circuit Court of Appeals in Atlanta. But it wasn’t until last month that the U.S. Board of Immigration Appeals ruled in her favor, saying the federal government had not shown she could return to Mexico and avoid persecution.

Sanchez’s extensive court records detail her harrowing journey from Mexico, where she was beaten, stabbed with an ice pick, thrown off a bridge and raped. The “horrific physical, mental and sexual abuse by family members, authority figures and a powerful military and police official” was motivated by a desire to punish her for being a transgender woman, documents say. The Atlanta Journal-Constitution generally does not identify victims of sexual assault but Sanchez chose to speak out in discussing her case.

At one point, Sanchez met a woman in Cancun who told her she had found her a job caring for an elderly person in America, documents say. Sanchez was instead drugged and sold into prostitution in Laredo, Texas, where she was held against her will and beaten.

After she arrived in America, Sanchez was convicted of driving without a license, driving under the influence and drug possession, though she was exonerated of that last charge after abiding by the terms of her probation. Her attorneys say her alcohol and substance abuse were symptoms of post-traumatic stress disorder brought on by the persecution she suffered in Mexico.

Sanchez, who now lives in metro Atlanta, was held in Stewart Detention Center and Irwin County Detention Center, at times in solitary confinement. Her plight was the subject of a 2015 editorial in The New York Times.

Sanchez is close to obtaining her GED and dreams of becoming an immigration attorney. For now, she is an immigrant rights activist who helps others with their legal cases.

The Atlanta law firm of Kilpatrick, Townsend & Stockton represented Sanchez pro bono. She also received help from Immigration Equality, a New York-based nonprofit that provides legal services to transgender immigrants.

One out of every 10 immigrants wins his or her asylum case in immigration courts, according to Syracuse University’s Transactional Records Access Clearinghouse, a research organization that monitors the federal government. Nearly half are successful when they have attorneys.

Federal Immigration Judge Dan Trimble, who ruled in Sanchez' case, denied asylum requests 96 percent of the time between fiscal years 2012 and 2017, according to TRAC. Nationwide, the average denial rate was 53 percent then.

“It shows that if you have counsel and if you are dedicated, you can get a good result,” said Jeffrey Fisher, one of Sanchez’s attorneys.