We all know the drill from prime-time TV: People arrested for crimes have the right to remain silent, and also to legal counsel, and “If you cannot afford an attorney, one will be appointed for you.” But in immigration court, the right to legal defense simply doesn’t exist, because such cases fall under civil, not criminal law. So, for the tens of thousands of people caught up in deportation proceedings every year, their right to remain in the country is on trial, and they face the punishment of losing their families and homes in the United States, and being sent to countries where their lives may be endangered. Yet they are often on their own in court.

New Jersey is one of a handful of states trying to buck that trend: In July, Governor Phil Murphy’s administration launched a promising pilot program to provide immigrants with free legal counsel in selected cities, with about $2 million earmarked for legal services in the state budget. The rollout of the program now seems uncertain, however; the actual disbursement of the funds so far has reportedly been botched by confusion over the allocation procedures for lawyers, and advocates across the state are still waiting.

According to an economic analysis on New Jersey’s immigrants, the consequences of this delay are not only hurting the immigrants themselves but also damaging the state’s economy. According to the report by New Jersey Policy Perspective (NJPP), the state and its workforce loses some $18 million in wages and $1.6 million in tax revenue each year because of immigrant workers’ being detained and unable to show up for work. Individual businesses in New Jersey would take a direct hit, losing potentially “$5.9 million in turnover-related costs annually as they are forced to replace detained or deported employees.” Hypothetically, as New Jersey has the third-largest immigrant population in the nation and one of the largest undocumented shares of the workforce (about 7.4 percent), the cost to the state’s GDP from the loss of all its undocumented immigrants would be the highest in the country, nearly 5 percent—more than would be lost by even California and New York, according to state fiscal data (though deporting them all would be logistically impossible).

The cost of providing free legal aid to immigrants, therefore, is far outweighed by the benefits of helping them stay out of detention and avoid deportation, and research has clearly demonstrated that a lawyer can mean the difference between separating a family forever and finding a permanent legal solution, or winning legal reprieve or humanitarian protection for refugees.

A New York–based study on immigrant legal representation found that for people in detention, just three percent without lawyers prevailed in court. The success rate for people with representation, even if they remained detained, was six times higher, and a stunning 74 percent for immigrants who were represented by lawyers and were not detained.

In New Jersey, the cost of universal legal counsel for deportation defense would be some $15 million. Governor Murphy’s $2 million pilot program was therefore just a start, but with even that funding now tied up in the state’s bureaucracy, many immigrants are stuck in detention without legal relief under Trump’s increasingly aggressive deportation drive.

Currently, 67 percent of immigrants in detention in the state lack legal counsel. According to the NJPP report, immigrants in New Jersey who are detained and lack lawyers “are deported 86 percent of the time.” A 2016 study of detainee outcomes by Seaton Hall Law Center showed that those with legal counsel were less likely to be detained and those in detention without legal representation were four times more likely to end up deported. But immigrants’ legal fees could easily cost well into the thousands, plus the massive cost of bail itself. The report supports a new initiative in the state’s budget to provide a universal counsel program for immigrants, similar to a program in New York that has expanded legal aid for immigrants. Overall, more than 74 percent of immigrant court cases in New York have lawyers.

With ICE arrests up 40 percent across New Jersey, the state would need to act quickly to protect immigrant communities and the state economy. Even more people will face deportation in the coming months: Tens of thousands of youth eligible for temporary deportation reprieve under the Obama-era DACA program are soon set to lose their status, while nearly 14,000 others who are shielded on humanitarian grounds by Temporary Protected Status will soon face deportation back to Guatemala, El Salvador, Haiti, and Nepal. Already, a massive backlog of cases is overwhelming immigration courts nationwide.

The NJPP report also zeroes in on the cost to families and children of detention and deportation: There are currently an estimated 168,000 US citizen children of undocumented immigrants living in the state. For children of ICE detainees, the state intervenes as a guardian of last resort, paying “approximately $732,000 in child health insurance and $203,000 in foster care.”

In addition to the immediate cost of child-welfare services for children of detainees, the consequences for kids, many of them US citizens, are immeasurable, ranging from disruptions in their education to emotional and psychological disorders. As the state weighs the future costs of the social services the children of detained and deported parents will need, NJPP analyst Erika Nava argues that “one thing that people don’t really realize [about children impacted by deportation is] about their mental health, and kids always seeing their parents anxious and reluctant to go places where other kids go, just because they’re afraid.”

Stopping mass detention and keeping families together is the best way to both save the cost of enforcement and preserve the hard-won livelihoods that New Jersey’s immigrants have cultivated. And that requires an unprecedented investment in providing access to justice.

When New Jerseyans are forced to pay for the services, incarceration costs, and economic losses triggered by mass incarceration and deportation of immigrants, Nava says, “We just make things worse for taxpayers in the state.” Investing instead in immigrants’ legal defense, however, would be an investment in “keeping families together, allowing immigrants to continue to contribute to the state and to their local economy, and keeping their child[ren]’s mental health stable.”

Of course, there is an overarching need for a total overhaul of our failed immigration system, to allow for broad amnesty and decriminalization nationwide. But funding legal aid is one small step toward achieving justice for immigrants. While the legal costs of protecting immigrant communities might be growing indefinitely, the cost denying them their day in court—and destroying families—is unimaginable.