America’s system for resettling refugees is collapsing.

The judge’s decision is yet another setback for the administration, which has sought to severely narrow the number of immigrants permitted in the country and discourage illegal immigration. (The Supreme Court upheld Trump’s travel ban in June.) But particularly in the case of TPS, it takes a swipe at a system that stems from humanitarian concern.

Congress created TPS in 1990 to address people displaced by natural disasters, armed conflicts, or other events. Once the Department of Homeland Security designates a country for TPS, its nationals who are already in the U.S. are provided temporary protection, thereby allowing them to live and work legally in the country. The Department of Homeland Security is supposed to review designations to evaluate whether a country has recovered. Oftentimes, however, protections extend for decades, which has been a common complaint among immigration restrictionists. Honduras, for example, still has TPS, about 20 years after a hurricane hit the country.

The Trump administration has taken the stance that the program should be treated, as its name suggests, as temporary. Department of Homeland Security Secretary Kirstjen Nielsen terminated TPS for El Salvador—which was struck by a major earthquake in 2001—in January after finding that “the substantial disruption of living conditions caused by the earthquake no longer exist.” The department similarly argued that conditions had improved in Haiti, Sudan, and Nicaragua. The expiration dates are staggered, but the group slated to lose protections first was TPS holders from Sudan, on November 2.

This American Life, a weekly radio program, shed light on tensions within the administration between staffers and Trump appointees to come to a decision on TPS designations. According to emails released as part of a lawsuit, staffers warned that TPS for countries such as Haiti and Sudan should not be terminated, because they had not fully recovered. And yet, after much back-and-forth, higher-ups in the administration decided to end it anyway.

A better way to absorb refugees

Plaintiffs in Ramos v. Nielsen argued that the administration’s decision to terminate TPS was “unlawful.” In a 43-page decision, Chen, an appointee of President Barack Obama, wrote that the administration departed from prior administration practice by not taking into account other country conditions.

But beyond the fight over process, Chen notes that ultimately there’s no immediate harm to the federal government if the decision to terminate TPS is temporarily halted. TPS beneficiaries, on the other hand, would have their life upended. The order states:

TPS beneficiaries thus risk being uprooted from their homes, jobs, careers, and communities. They face removal to countries to which their children and family members may have little or no ties and which may not be safe. Those with U.S.-citizen children will be confronted with the dilemma of either bringing their children with them, giving up their children’s lives in the United States (for many, the only lives they know), or being separated from their children.

Chen also cited a brief filed by some states that highlights the contributions of TPS holders: If TPS holders lose status, it’ll cost them $132.6 billion in GDP, $5.2 billion in Social Security and Medicare contributions, and $733 million in employers’ turnover costs.