“Mexico deeply regrets the cancellation” of the program known as DACA, President Enrique Pena Nieto said in a tweet.
“The Mexican government will urge US authorities to find a swift, permanent solution that gives legal certainty to the young people of DACA,” he wrote.
Trump announced permits issued under the program would be gradually phased out as they expire over the next six to 24 months.
He left it up to Congress to draft an immigration reform to address the legal situation of some 800,000 people formerly protected from deportation under the program, implemented by his predecessor, Barack Obama.
Some 625,000 Mexicans are protected under DACA, according to the Mexican foreign ministry.
Pena Nieto said they would be welcomed “with open arms” in Mexico if they ended up being deported to the country of their birth, where many have barely ever lived.
Mexico has a “moral imperative” to lobby the Trump administration and Congress to quickly resolve the legal gray area, Mexico’s Deputy Foreign Minister Carlos Sada told a press conference.
“There is no question that setting immigration policy in the United States is the exclusive role of the American people and their institutions,” the foreign ministry said.
“However, our country cannot ignore the fact that thousands of young people born in Mexico will likely be affected by today’s decision.”
The issue of Mexican immigration to the United States has strained relations between the two neighbors since Trump took office, along with his vows to make Mexico pay for a wall on the border.
Trump’s decision sparked protests in Mexico. On Monday night, some 20 women held a prayer vigil in the northern city of Tijuana against the imminent end of DACA, gathering along the border at a spot where there is already a metal barrier between the two countries.
Another small group protested outside the US embassy in Mexico City on Tuesday.
Among them was recently deported mother Maria Jimenez, 40, whose daughter, Brenda Guadarrama, remained in the US under DACA.
Now 20 years old, Guadarrama has lived in the United States since she was two. Since her mother was sent back to Mexico four months ago, she has had to support her three younger siblings.
“My daughter fought hard to study and get ahead…. She is one of millions of young people who have done nothing but fight for a better future,” Jimenez told AFP.
The legal limbo, she said, “is agony.”
“It’s as if they told you that tomorrow you were going to die.”