In 2013, Astrid Morataya, a single mother of three living in Illinois, was awoken by a knock at the door. Peeking out her window, she saw law enforcement in emblazoned jackets and bulletproof vests gathering outside her home. Surely this is a mistake, she thought.

Morataya came to the U.S. as a young girl, her family fleeing the civil war in Guatemala — her uncle was one of thousands disappeared in the conflict and her father, a student activist, feared he too could be targeted by Guatemala’s U.S.-backed security forces. Morataya grew up on the North Side of Chicago. She went to school and started a family there, and ultimately became a lawful permanent resident. In 1997, she was arrested on a minor drug charge, accused of attempting to sell $10 worth of crack cocaine. While it’s unclear if the police ever found the drugs, Morataya faced up to 35 years in prison if convicted. Her lawyer at the time advised her to plead guilty.

“It’s my word against the police officers,” Morataya said of her decision. She served a yearlong probation, paid her fines, and, she thought, proceeded to move on with her life. “Fifteen years later, immigration came knocking on the door.”

The officials informed Morataya that she had been slated for deportation. She was told that she would have an opportunity to present her case before a judge at a bond hearing. As it turned out, that wasn’t exactly true.

Morataya spent the next 2 1/2 years fighting from behind bars. She watched others in the facilities she was sent to, people with stories similar to hers, give up and submit themselves to deportation. For Morataya, that was unacceptable. She was a single mother with three dependent children.

“I had to fight to stay in this country for my children,” Morataya told The Intercept. “I appealed a lot,” she said. “I tried it all.”

Astrid-Jazlynn-Day-After-Release

Astrid Morataya and her daughter on the day of her release.

Photo courtesy of Community Initiatives for Visiting Immigrants in Confinement and the Immigrant Rights Clinic at the NYU School of Law

Despite her best efforts, Morataya remained in detention. She had been pulled into an immigration system that has seen thousands of people locked up for months or years without their detention being considered by a judge in a bond hearing — unlike in criminal court, those held in the nation’s sprawling immigration apparatus, including green card holders and asylum seekers, have no enshrined right to a speedy appearance before a judge.

It’s a practice that will now be challenged before the Supreme Court, with oral arguments beginning Wednesday. The class-action suit, Jennings v. Rodriguez, addresses whether individuals held in long-term immigration detention have the right to a bond hearing before a judge.

Filed by the ACLU, the lead plaintiff in the suit is Alejandro Rodriguez, a longtime lawful permanent resident who was detained for more than three years, facing deportation, on charges of possession of a controlled substance and “joyriding,” without a judge considering the merits of his detention.

Rodriguez’s deportation was ultimately canceled and the suit that stemmed from his ordeal led to an injunction, affirmed by the U.S. Court of Appeals for the 9th Circuit, requiring that members of the class in question be provided hearings before an immigration judge at least every six months.

Lawyers for the Obama administration, who appealed the decision, have argued that the 9th Circuit was “fundamentally wrong” in its conclusions. The opposing sides will now make their cases to the nation’s highest court. With President-elect Donald Trump vowing to make the deportation of undocumented immigrants with criminal records a top priority, while also calling for a federal hiring freeze that would likely stall immigration court proceedings in profound ways, immigration advocates see the questions at the heart of the Jennings case as particularly crucial.

“I think we all fear that under President-elect Trump that problem is only going to get worse,” said Michael Tan, a staff attorney at the ACLU’s Immigrants’ Rights project. Tan added that “one of the saddest ironies” of the current immigration and detention system is that some of those with the greatest stakes in staying in the U.S. — longtime lawful permanent residents raised in the U.S. and asylum seekers fleeing oppressive states — are often the most likely to stick it out and fight their deportation, meaning they often spend the most time locked up.

The emotional and financial toll of spending weeks, months, or years in detention waging those fights is often profound — and in some cases, entirely avoidable. The Jennings suit, for example, includes an Ethiopian asylum seeker who fled abduction, torture, and a year of captivity in his native country. Once he made it to the U.S., the man passed his credible fear screening — the first step on the road to asylum — but was still held in DHS detention for nine months because U.S. officials had identified “an apparent correlation with all the Somalian Detainee’s [sic] that present [sic] a paradigm of deceit and paralleled ambiguity of events and identity.” Lawyers for the Jennings plaintiffs have pointed out that had the man “been afforded a bond hearing, he would have had the opportunity to point out, among other things, that he was not Somali, as his government-issued photo identification showed.”

Prolonged Detention Stories, a multimedia project by the NYU School of Law’s Immigrant Rights Clinic and Community Initiatives for Visiting Immigrants in Confinement, has compiled other stories of individuals swept up in the immigration detention system for extended periods, including other asylum seekers, U.S. military veterans, and numerous lawful U.S. residents, such as Morataya, whose story features prominently on the school’s site.

After being taken into custody in 2013, Morataya was shuttled to a series of facilities around the Midwest before landing in Wisconsin. Her children had been relocated to live with family in Iowa, a six-hour drive away. She saw them just three times in the years she was locked away, in meetings that never lasted more than half an hour and were sometimes conducted through a TV screen. A five-minute long distance phone call to her kids cost $25, Morataya recalled.

“What can you really tell your family member in five minutes?” she asked.

Morataya longed for the opportunity to appear before a judge and rejected the idea of trying to go underground if she was released. “I wasn’t trying to escape,” she said. “I wanted to show up in court.” Instead, she said, she was treated like a “menace to society.”

Morataya did what she could to learn and understand the rules and laws arrayed against her. Eventually, she discovered a potential means to be released. Years earlier, she had been kidnapped by a former partner. The man held her captive for two days, beating her repeatedly. After escaping, Morataya helped law enforcement convict her abuser by testifying in court. The man received six months in prison — a fifth of the time Morataya spent behind bars. (He was later convicted of another domestic violence offense and sentenced to 35 years.)

Because she was a victim of domestic abuse and had previously cooperated with law enforcement, Morataya learned that she was eligible for a U visa, which could protect her from deportation and get her out of detention. With the help of immigration attorneys from Chicago, who she says came down “like angels from the sky,” Morataya was able to successfully make the U visa argument. She was released last year.

The grim implications of how she won her freedom are not lost on her. “If I wouldn’t have got beat up, I wouldn’t be here right now,” Morataya said.

Still, Morataya’s newfound freedom has been riddled with challenges, including an inability to find work. “I haven’t had a job in three years,” she said. She tries to explain the gap on her resume in job interviews, she said, but “nobody wants to hear that.”

“I’m back to starting from the bottom.”

Top photo: The U.S. Supreme Court.