A federal appeals court in California halted the Trump administration’s “Remain in Mexico” immigration policy on Friday, a blow to the president’s restrictive immigration agenda that cripples one of the government’s approaches to curbing migration across the U.S. southern border.

The program — officially known as the Migrant Protection Protocols, or MPP — called for pushing asylum seekers back into Mexico to await their U.S. asylum hearings, part of an effort to limit migrant access to U.S. soil and to lessen a record migration surge among Central American families. More than 470,000 parents and children crossed into the United States last fiscal year, and most were quickly freed into the country to await U.S. immigration court hearings after they claimed asylum.

The Trump administration has claimed that the migrant families have been exploiting loopholes in U.S. law to secure their release, knowing of the court-mandated 20-day limit for detaining children. The MPP program was designed to prevent families from entering the United States and later skipping their court hearings to avoid deportation; instead, families have been sitting on the Mexico side of the border.

The Ninth Circuit Court of Appeals ruled 2-1 to uphold a lower-court’s injunction on MPP, saying that the policy “is invalid in its entirety due to its inconsistency with” federal law, and “should be enjoined in its entirety.”

Judges Richard A. Paez and William A. Fletcher, both appointed by President Bill Clinton, voted to uphold the injunction, while Ferdinand F. Fernandez, a President George H.W. Bush appointee, disagreed.