WASHINGTON, D.C. — The U.S. Supreme Court has agreed to hear cases stemming from President Donald Trump’s immigration policies related to financing border wall construction and the requirement that asylum-seekers remain in Mexico until their claims are processed.

The court said Oct. 19 it would take up the cases after the Justice Department appealed lower court rulings against the policies.

The justices earlier had allowed the Trump administration to move forward with its plans as the cases wound their way through the federal courts.

In a 5-4 vote July 31, the justices gave the go-ahead for construction to continue on portions of the border wall with Mexico by declining requests from several organizations that the high court stop the work.

The decision came after the U.S. Court of Appeals for the 9th Circuit ruled in June that the administration’s transfer in 2019 of $2.5 billion in military funds to pay for border wall construction was an illegal overreach of executive authority.

In the second case, the Supreme Court in an order March 11 had granted the administration’s request to continue enforcing its “Remain in Mexico” policy while a lower court’s ruling that blocked the policy was being appealed to the high court.

The 2019 Migrant Protection Protocols, as the policy is formally known, require asylum-seekers to stay in Mexico while their cases make their way through U.S. immigration courts.

The border wall case originated in 2018 as the Trump administration disputed with Congress how to fund barrier construction along the U.S.-Mexico border. Congress opposed the transfer of funds from the military budget for the wall, saying it alone allocates federal dollars.

The Supreme Court in July, in another 5-4 vote, declined to lift a stay imposed in 2018 that allowed the federal government to continue to build the barrier while the legal challenge to using military funds for construction continued.

Challengers to the funding plan, the Sierra Club and the Southern Border Communities Coalition, had asked the court to intervene, saying if the stay was not lifted the administration could finish the wall before the court ever had the chance to rule on the transfer of funding.

In 2018, the U.S. Conference of Catholic Bishops opposed the president’s declaration of a national emergency to free up additional funding to construct the barrier along parts of the border.

The southern border wall has been a major part of Trump’s platform since the start of his 2016 election campaign when he promised Mexico would pay for it.

“Remain in Mexico” allows the Department of Homeland Security to return asylum-seekers to Mexico to await their claims to be heard. It was first implemented in January 2019 by department officials at the border crossing in San Diego, and it initially was limited to asylum-seekers from Guatemala, Honduras and El Salvador. The policy was expanded to crossings in Calexico, California and four Texas cities and widened to include more people from other Spanish-speaking countries.

In its ruling, the 9th Circuit said the plaintiffs in the case presented evidence that they as others returned to Mexico under the protocols “face targeted discrimination, physical violence, sexual assault, overwhelmed and corrupt law enforcement, lack of food and shelter and practical obstacles to participation in court proceedings in the United States.”

In his filing with the Supreme Court, U.S. Solicitor General Noel Francisco said the lower court rulings against the protocols “nullify an essential effort by the government to address the unprecedented number of migrants arriving at our Southwest border.” He said that not being able to enforce the policy would put an “immediate and unmanageable strain” on the U.S. immigration system.

The Supreme Court is not expected to hear the cases until 2021.