Legal and domestic violence advocates in Texas have blasted the arrest of an undocumented transgender woman, who was detained by immigration agents after appearing in court for a protective order against an alleged abuser.

The woman, a Mexican citizen living in El Paso and identified by her initials I.E.G., received a protective order last Thursday against an allegedly abusive partner accused of attacking her in at least three increasingly violent incidents she reported to police, County Attorney Jo Anne Bernal said.

“The last incident involved her partner chasing her with a knife,” which he then allegedly threw at the woman but missed, Bernal said.

After Judge Joe Gonzalez granted the protective order, the woman spoke with her attorney in a jury room and then attempted to leave, but was met by agents with U.S. Immigration and Customs Enforcement [ICE], Bernal said.

One agent had allegedly sat through the proceedings at the El Paso County Courthouse, while another waited outside the courtroom, she said.

"In all our years... none of us can recall an incident where immigration agents made their presence known inside a courtroom... especially not in a courtroom that is reserved for victims of domestic violence," Bernal said.

Read: Mother of 2 Deported to Mexico as Family Continues to Fight for Her Safe Return

The agents escorted her down the hallway, into an elevator and outside the building, where she was detained, Bernal said.

She said she believes a domestic violence courtroom should be treated like a “sensitive location,” afforded the same consideration as a school, health care facility, place of worship or religious observance, saying the “sole reason” a person turns to that court is for "solace or protection."

Bernal speculated that federal agents likely received a tip that the woman was appearing in court from her alleged abuser, who she said was the only other person who was given written notice of the hearing.

In a statement to InsideEdition.com, an ICE spokeswoman said task force agents assigned to Homeland Security Investigations [HSI] El Paso’s Border Enforcement Security Task Force [BEST] received a tip from another law enforcement agency that the woman had illegally re-entered the U.S. after she was previously deported.

It was not immediately clear, however, how the agents came to know she was set to appear in court last Thursday.

According to an arrest affidavit filed by ICE, agents were conducting surveillance at the courthouse when they spotted the woman, who they noted lived at the Center Against Sexual and Family Violence.

I.E.G. allegedly admitted to being a Mexican citizen who was in the U.S. without legal status, the affidavit said.

It did not mention the agents having any contact with I.E.G. inside the courthouse or the courtroom.

The ICE spokeswoman said the woman had a “lengthy criminal history with at least eight convictions on charges including false imprisonment, assault, domestic violence and illegal re-entry,” and had been deported six times.

“Over the years, BEST has become a successful interagency law enforcement collaboration model that’s keeping our communities and the United States safer,” the statement said. “BEST El Paso is composed of full-time members from various local, state and other federal agencies. BEST El Paso, through intelligence-driven initiatives, is responsible for identifying, investigating and eliminating vulnerabilities to one of the nation’s busiest border areas with Mexico.”

Bernal said the woman had no current outstanding state warrants, and authorities from El Paso added that any previous convictions do not negate a domestic victim’s right to protection.

“I don’t think it matters what your status is in the country, I think everybody has a right to live free of violence,” said El Paso District Attorney Jaime Esparza, saying the arrest "sends a horrible message to victims of domestic violence on whether or not they’re actually going to have the ability to seek justice in the courthouse."

Read: After Super Bowl Ads Get Political, Demands Grow for Boycotts on Some American Brands

Stephanie Karr, executive director at the Center Against Sexual & Family Violence in El Paso where the woman reportedly lived, said the organization has received multiple phone calls from survivors asking if they too will be arrested.

“They’re saying, ‘I came forward, am I in danger now?’” Karr said, noting she and her colleagues are “alarmed” they can’t say for certain whether they are safe.

Thus far, no one has reached out to the district attorney’s office to change a hearing date as a result of the incident last week, Esparza said.

The alleged domestic violence victim is being held at the El Paso County Jail under a federal ICE detainer.

Bernal said that an attorney from her office met with the woman on Thursday morning and that she seems to have a “pretty positive attitude, given her surroundings.”

The woman, who is currently segregated and not in general population, will be represented by a public defender on the criminal charges she faces and an immigration lawyer on her immigration charges, officials said.

Bernal said she and her associates on Friday will meet with Rep. Beto O’Rourke (D-Texas), an El Paso native, to discuss the incident, noting she hopes to have a "positive resolution" going forward.

"We are hoping this is an isolated incident; we fear that it is not," she said. "The courthouse is not a place for enforcement of immigration law."

Watch: Undocumented Mother of 4 Fearing Deportation Moves Into Church