A spokesman for the Foreign Ministry, Roberto Velasco, said the move did not represent an agreement between the two countries, but rather “a unilateral move by the United States that we have to respond to.”

Mr. Velasco said the rules would apply only to new asylum applicants, not to individuals who have already entered the United States with processes underway. The United States did not initially make clear if the policy applied only to new applicants.

The administration’s move is a sharp departure from decades of American asylum practice, according to legal experts and advocates. The United States has long accepted individuals from across the world fleeing harm or persecution in their home countries.

The program is almost certain to be challenged in the United States courts by human rights groups and advocates. Many have already claimed that sending persecuted individuals to Mexico, one of the most violent countries in the world, places them in harm’s way.

“This deal is a stark violation of international law, flies in the face of U.S. laws passed by Congress, and is a callous response to the families and individuals running for their lives,” said Margaret Huang, the executive director of Amnesty International.

While the individuals would be allowed to return to the United States for court hearings, they would remain in Mexico under a humanitarian visa until their process is completed.

Mexico’s decision to accept the asylum seekers is likely to be seen as a capitulation by the new government to President Trump, who proclaimed over Twitter two weeks ago that Mexico would house asylum applicants to the United States on its soil.