DHS Secretary Kirstjen Nielsen announced an agreement on Thursday with Mexico that will keep asylum seekers in Mexico until their cases are heard by an immigration judge. Under the new agreement, migrants who ask for asylum at a port of entry or illegal aliens apprehended by border patrol who ask for asylum will be issued a court date and returned to Mexico. Mexico has agreed to allow any foreign citizen with an a notice to appear in court to stay in Mexico until the date arrives.

“Today we are announcing historic measures to bring the illegal immigration crisis under control,” said Secretary Nielsen. “We will confront this crisis head on, uphold the rule of law, and strengthen our humanitarian commitments. Aliens trying to game the system to get into our country illegally will no longer be able to disappear into the United States, where many skip their court dates. Instead, they will wait for an immigration court decision while they are in Mexico. ‘Catch and release’ will be replaced with ‘catch and return.’ In doing so, we will reduce illegal migration by removing one of the key incentives that encourages people from taking the dangerous journey to the United States in the first place. This will also allow us to focus more attention on those who are actually fleeing persecution.

“Let me be clear: we will undertake these steps consistent with all domestic and international legal obligations, including our humanitarian commitments. We have notified the Mexican government of our intended actions. In response, Mexico has made an independent determination that they will commit to implement essential measures on their side of the border. We expect affected migrants will receive humanitarian visas to stay on Mexican soil, the ability to apply for work, and other protections while they await a U.S. legal determination.”

In exchange, the United States has pledged $10.6 billion in aid for Central American and southern Mexico. The aid is to be used for strengthening government and economic development and Central America and development aid for Mexico.

In post-midterm polling conducted by NumbersUSA, the majority of voters preferred a solution to the caravan crisis that kept migrants out of the United States. According to the poll, 58% of midterm voters support keeping migrants in Mexico while they await their asylum hearing. You can read more about the poll here.

For more on this story, see DHS.gov.