WASHINGTON — Migrants heading to the southwest border to seek asylum in the United States will have to wait in Mexico until their claims are processed, under an agreement between the two countries announced today that will affect tens of thousands of people each month.

Only about 9 percent of people are actually granted asylum. The Trump administration says too many migrants make false claims.

“They will not be able to disappear into the United States,” Nielsen said today in remarks before the House Judiciary Committee. “They will have to wait for approval. If they are granted asylum by a U.S. judge, they will be welcomed into America. If they are not, they will be removed to their home countries.”

Discussions on the arrangement have been going on between the two countries for months, well before the new leadership took over in Mexico on Dec. 1.

Today, the Mexican foreign ministry said Mexico had agreed to it on a temporary basis for humanitarian reasons, and it would affect those “who entered that country or had been apprehended at border entry points, and who have been interviewed by that country’s immigration authorities and who have received a court date to appear before an immigration judge.”

American Civil Liberties Union attorney Lee Gelernt said the plan was illegal. “This plan cannot be done lawfully and will result in countless people in life-threatening situations.”

The decision comes as the courts have blocked efforts to harden asylum rules.

More than 100,000 immigrants were caught crossing the U.S.-Mexico border in October and November. Nearly half of them were traveling in family groups that included children, according to statistics from U.S. Customs and Border Protection.

While the number of immigrants caught crossing the border illegally has fallen since the 1990s and early 2000s, U.S. authorities have been grappling in recent years with an increase in children traveling alone or with family.

It is not illegal to cross the border without a visa to apply for asylum. Immigrant advocates say violence in the Central American countries of El Salvador, Guatemala and Honduras is driving people north, and many are coming to seek asylum.

Nearly 100,000 immigrants requested initial asylum screenings during the fiscal year ending in September, according to U.S. Citizenship and Immigration Services. Most of the cases were filed in Texas.

Trump administration officials say one of the major pull factors for migrants coming across the border is the idea that they can wait in the United States for months or even years as their asylum cases progress.

They argue many disappear into the U.S. Forcing them to wait in Mexico will cut down on false asylum claims. The policy change applies only to migrants coming from countries other than Mexico, officials said.

Thousands of migrants have come up from Central America in recent weeks as part of caravans. President Donald Trump used his national security powers to put in place regulations that denied asylum to anyone caught crossing illegally, but a judge has halted that change as a lawsuit progresses.

Nielsen said in a statement the policy would be done legally.

“This will also allow us to focus more attention on those who are actually fleeing persecution,” she said in a statement.

In an immigration development Wednesday, a federal judge in Washington, D.C., blocked Trump administration policies that prevented immigrants who suffered gang violence or domestic abuse in their home countries from seeking asylum.

U.S. District Judge Emmet Sullivan declared that some of the guidance that then-Attorney General Jeff Sessions issued this year cannot be used to determine whether an immigrant has a credible fear of persecution or torture in their home countries, the first step to making an asylum claim in the U.S.

The judge said the administration’s policy on asylum seekers violates federal immigration law and that “it is the will of Congress — not the whims of the executive” that sets the standards for expedited removal.

It was yet another legal blow for President Donald Trump’s efforts to harden immigration policies without Congress changing laws. A U.S. judge in San Francisco Wednesday extended his decision blocking the Trump administration from enforcing a ban on asylum for any immigrants who illegally cross the U.S.-Mexico border.

Judge Jon Tigar ruled in favor of keeping the ban on hold pending the outcome of a lawsuit challenging it. The case could take months to resolve. He had previously blocked the ban for 30 days.

The ban conflicts with an immigration law that says immigrants can apply for asylum regardless of how they enter the U.S., Tigar said.

The administration has asked the Supreme Court to allow that asylum policy to go forward.