The Trump administration is making it more difficult for migrants traveling through Central America to seek and obtain asylum protections when they cross the southern border.

The Departments of Homeland Security and Justice released a new rule Monday under which migrants who enter the United States at the southern border are ineligible for asylum unless they sought protection in one of the countries they traveled through first. The measure, an effort to stem the flow of migrants from Central America into the U.S., is expected to take effect Tuesday.

To remain eligible for safe harbor in the U.S., the rule requires migrants to first seek protection in a country they traverse, such as Mexico, El Salvador, or Guatemala, before arriving at the southern border.

The measure comes as the Trump administration confronts a flood of migrants crossing the southern border in what President Trump has called a humanitarian and security crisis. Democrats have blamed the president for implementing policies that have led to overcrowding and unsafe conditions at detention centers, while Republicans are calling for an overhaul the nation’s immigration and asylum laws.

The president has sought to implement rules designed to deter migrants from making the journey to the U.S.-Mexico border, but his administration has faced a series of setbacks in the federal courts.

Attorney General William Barr said in a statement the Trump administration is acting within the authority designed by Congress to restrict asylum eligibility.

“The United States is a generous country but is being completely overwhelmed by the burdens associated with apprehending and processing hundreds of thousands of aliens along the southern border,” said Barr. “This rule will decrease forum shopping by economic migrants and those who seek to exploit our asylum system to obtain entry to the United States — while ensuring that no one is removed from the United States who is more likely than not to be tortured or persecuted on account of a protected ground.”

But like other measures implemented by the Trump administration regarding asylum protections for migrants, it's likely this latest measure will be challenged in federal court.

On Sunday, federal immigration authorities started conducting raids targeting illegal immigrants who have been ordered by the courts to be removed. The raids are expected to take place in nine cities, including Atlanta, New York, and San Francisco, and target roughly 2,000 people, many of whom have recently arrived in the U.S.

The new restriction from the Trump administration outlines three exceptions: if the migrant applied for asylum in at least one of the countries they traveled through before arriving in the U.S. but was denied protection; if the migrant was a victim of a “severe form” of human trafficking; or if none of the countries the migrant traveled through has signed one of three major international treaties protecting refugees.

[Read more: DHS inspector general confirms investigation into leaked ICE raids]