The US Supreme Court on Wednesday approved the Trump administration's request to restrict asylum applications submitted by immigrants at the US-Mexico border.

The rule, which requires immigrants to seek asylum in another country they pass through on their travels to the US, could soon be implemented, according to the court.

The rule does not apply to victims of trafficking or migrants who were refused asylum in other countries they passed through. Under the ruling, however, the US government can deny asylum to anyone who didn't apply for asylum in another nation after fleeing their home country but before coming to the US.

Trump applauded the Supreme Court decision calling it a "BIG United States Supreme Court WIN for the Border on Asylum!"

US Supreme Court Justices Sonia Sotomayor and Ruth Bader Ginsburg both objected to the court ruling.

“Once again the Executive Branch has issued a rule that seeks to upend longstanding practices regarding refugees who seek shelter from persecution,” Sotomayor wrote in her dissenting opinion, according to the Washington Post.

“Although this Nation has long kept its doors open to refugees — and although the stakes for asylum seekers could not be higher — the Government implemented its rule without first providing the public notice and inviting the public input generally required by law," she added.

The ruling comes after the Trump administration requested that the Supreme Court lift an order that prevented the administration from enforcing the asylum restriction.

Mexico's Foreign Minister Marcelo Ebrard revealed Monday that Mexico will not agree to being a safe third country for those seeking asylum. "I just heard statements from the CBP [US Customs and Border Protection] manager. I reiterate in the face of pressures: Mexico is not and will not accept being a safe third country, we have a mandate in that regard from the President of the Republic and it is a consensus in the Senate of all political forces. We will not accept it," Ebrard said in a translated tweet Monday afternoon.

— Marcelo Ebrard C. (@m_ebrard) September 9, 2019

​In July, the American Civil Liberties Union, Southern Poverty Law Center and Center for Constitutional Rights filed a lawsuit in the US District in San Francisco challenging the Trump administration's asylum restriction.

"The rule directly violates Congress’s clear requirement that for a noncitizen to be denied asylum because of his or her relationship with a third country, the noncitizen had to be firmly resettled in that third country or subject to a safe third country agreement, as well as Congress’s requirement that asylum cannot be categorically denied based on an asylum seeker’s route to the United States," the lawsuit states.

In July, Baher Azmy, legal director at the Center for Constitutional Rights, also called the asylum restriction a "deeply dangerous" effort by the Trump administration to "inflict maximal cruelty on vulnerable people fleeing desperate conditions for safety here."