A US district court froze Texas's controversial immigration law, which allowed police to arrest and prosecute unauthorized migrants crossing the border from Mexico to the United States.
The decision came just hours after the Supreme Court allowed the measure, known in the state as SB4, to take effect pending an appeal.
The Biden administration has also challenged SB4, calling it unconstitutional.
"This Court has long recognized that the regulation of entry and removal of noncitizens is inseparably intertwined with the conduct of foreign relations and thus vested 'solely in the Federal Government,'" the White House wrote in a filing with the US Supreme Court earlier this month.
Meanwhile, Texas has argued that it was within its rights to arrest migrants because SB4 was applicable under the State War Clause of the US Constitution, which allowed states to act when it is "actually invaded, or in such imminent Danger as will not admit of delay."
Mexico: We'll Not Accept Migrants Deported by Texas
In response to the legal update, the Mexican government issued a statement saying that they would refuse to accept any migrants deported by Texas under the new law.
"Mexico reiterates its legitimate right to protect the rights of its nationals in the United States and to determine its own policies regarding entry into its territory," the country's foreign ministry said.
"Mexico recognizes the importance of a uniform migration policy and the bilateral efforts with the United States to ensure that migration is safe, orderly and respectful of human rights, and is not affected by state or local legislative decisions."
If SB4 were to come back into effect, it would mark a significant shift in how immigration enforcement is handled, as courts have previously ruled that only the federal government can enforce the country's immigration laws, and not individual US states, the BBC reported.