Immigrant diagnosed with brain tumor released after 15 months in ICE custody In January, an immigration judge ordered the 26-year-old to leave the U.S.

 -- A 26-year-old mother from El Salvador who was recently diagnosed with a brain tumor has been released from U.S. Immigration and Customs Enforcement custody in Texas.

An immigration judge in Dallas granted bond to Sara Beltran Hernandez on Thursday, allowing her to leave a detention facility to seek treatment for the tumor. Her family in New York posted her $15,000 bond, and she was released late Thursday afternoon, according to the Associated Press.

"I want to thank Amnesty International activists taking action on my behalf,” Beltran Hernandez said in an Amnesty International release. "Because of you, I can now get the medical care I need and be reunited with my family."

Beltran Hernandez has been in federal custody for more than 15 months, since being apprehended by immigration agents in Hidalgo, Texas, after she crossed the border on Nov. 4, 2015. She was fleeing what she described as “severe domestic violence” from a boyfriend and “death threats” from a gang leader in El Salvador, according The Washington Post, citing court documents. She passed a “credible fear” interview that qualified her to apply for asylum, the Post reported.

She has two small children in El Salvador who would be allowed to join her if she is granted asylum.

In January, an immigration judge ruled against her asylum petition, according to the AP. That same month, Beltran Hernandez was transferred to a private detention facility on contract with the federal government, and on Feb. 10, lawyers said Beltran Hernandez collapsed while talking to another detainee, the AP reported. Immigration agents took her to a Fort Worth-area hospital, where she was diagnosed with a brain tumor and remained for almost two weeks.

Her attorneys have said they had trouble visiting her at the hospital and had difficulty reaching her by phone. Immigration officials said she was able to speak by phone with her family and her attorney of record while at the hospital.

On Feb. 23, Beltran Hernandez was returned to ICE custody at the Prairieland Detention Center in Alvarado, Texas. A spokesperson for ICE said that Hernandez's condition was determined to be stable before she was discharged from the hospital and sent back to the detention center, the AP reported.

Beltran Hernandez's attorneys said they were concerned that the necessary level of monitoring was not being done at the detention center's medical facility, according to the AP.

"I feel dizzy, with pain. Heavy eyes. Nausea. If I walk fast, I feel dizzy. Noise really bothers me. I have not eaten since yesterday [when I ate a salad] because I have no appetite. Sometimes, I forget things. The tongue is not always responsive," Beltran Hernandez told an attorney who visited her at the detention center, according to The AP.

Beltran Hernandez's attorney said a specialist Monday confirmed that she has a large tumor on her pituitary gland. The tumor was determined not to be cancerous and does not need to be immediately removed, the lawyer, Fatma Marouf, said. She said the doctor said Beltran Hernandez should be monitored because the tumor had hemorrhaged, though it was no longer bleeding, and that she should return for scans every six weeks, according to the AP.

In a statement, Beltran Hernandez thanked Amnesty International USA for assisting her in the release.

Amnesty International USA said it hopes Beltran Hernandez's case will inspire the government to change its policies toward illegal immigrants.

“We hope some good can come out of Sara’s nightmarish ordeal, and the federal government will change its policies and stop putting people with asylum claims in detention this way," said Amnesty International USA spokesperson Eric Ferrero. "People fleeing horrific violence to seek asylum in the U.S. should be treated with dignity and compassion, not treated like criminals.”

ABC News' Aaron Katersky contributed to this report.

Editor’s note: An earlier version of this story incorrectly referred to Sara Beltran Hernandez as a "Dreamer." This has been amended to reflect that she came to the U.S. as an adult and as such would not be covered by the proposed DREAM Act that would apply to certain people who immigrated to the U.S. as children.