The sun rises as asylum-seeking migrants' families from Honduras and El Salvador walk towards the border wall after crossing…
FILE - Migrants from Honduras and El Salvador walk towards the border wall after crossing the Rio Grande River into the United States from Mexico on a raft, in Penitas, Texas, March 26, 2021.

The U.S. Supreme Court unanimously ruled Monday that 400,000 immigrants from 12 countries living in the United States for humanitarian reasons are not eligible to become permanent residents. 

Justice Elena Kagan, writing for the court, said that U.S. immigration law blocks migrants who entered the country illegally from obtaining permanent residency, or "green cards," although they have Temporary Protected Status. 

FILE - Associate Justice Elena Kagan.

The TPS designation applies to migrants who came to the U.S. to escape war or natural disasters in their homelands. It protects them from being deported and they can work legally in the U.S., but, now with the Supreme Court ruling, they cannot seek permanent residency. 

The ruling came in a case involving a couple from El Salvador, Jose Sanchez and Sonia Gonzales, who have been in the U.S. since the late 1990s and live in New Jersey. The decision turned on a question as to whether people who came to the U.S. illegally, yet were granted humanitarian protections, were ever "admitted" to the country. 

Although a district court ruled in favor of the couple, an appeals court reversed the decision. It held that TPS does not "constitute an admission" into the U.S.  

The Supreme Court agreed that the two were not admitted legally. 

"The TPS program gives foreign nationals nonimmigrant status, but it does not admit them," Kagan wrote. "So the conferral of TPS does not make an unlawful entrant ... eligible" for a green card. 

The House of Representatives has approved legislation that would allow the migrants using the TPS program to become permanent residents, but the fate of the measure is uncertain in the Senate. 

Currently, besides El Salvador, migrants with TPS status from 11 other countries are protected from deportation. Those countries include Haiti, Honduras, Myanmar, Nepal, Nicaragua, Somalia, South Sudan, Sudan, Syria, Venezuela and Yemen.