Updated at 11:37 a.m. ET

Migrants who cross the U.S. southern border and seek asylum will be deported to Mexico while their claims are being processed, Homeland Security Secretary Kirstjen Nielsen said Thursday.

Currently, people claiming asylum are allowed to stay in the U.S. — sometimes in detention — while their claim is pending in immigration court. The new policy will send such migrants to Mexico for the duration of that process.

That's true regardless of the migrants' country of origin: Many people crossing the U.S.-Mexico border are not Mexican, but are fleeing violence in Central America.

The immigrants will still "be interviewed by a U.S. asylum officer, but they will no longer be released into the interior with a notice to appear in immigration court," NPR's John Burnett reports. "DHS has long complained that many applicants simply disappear and never show up for their hearing."

The Mexican government, while affirming its own sovereign rights to determine who enters the country, said it would allow the practice. Mexico also said it would extend some rights and protections to the non-Mexican asylum-seekers on Mexican soil who await immigration hearings in the U.S.

The migrants will receive humanitarian visas, have the opportunity to apply for work permits and have access to legal services, Mexico said.

Last month, The Washington Post reported that the Trump administration had reached a deal with Mexico to allow asylum-seekers to remain south of the border while their claims were processed. However, governments of both countries would not publicly confirm that a plan was in place, in part because the Mexican government was days away from a transition of power.

The announcement on Thursday appears to confirm those early reports.

In late November, Lee Gelernt, an attorney with the American Civil Liberties Union, said there were questions about the legality of such a proposal.

"One thing we know right off the bat is that it cannot be legal unless they can assure all the asylum seekers who will be stranded in Mexico ... will be safe — not only from persecution by state actors in Mexico, but by criminal gangs," Gelernt told NPR. "And from what we know about what's going on, we see no likelihood that that is going to be true."

Copyright 2018 NPR. To see more, visit https://www.npr.org.