In a 5-4 decision on Tuesday (April 17), the Supreme Court struck down parts of a federal law that facilitated the deportation of immigrants convicted of crimes, ruling that a provision of the Immigration and Nationality Act is unconstitutionally vague and cannot be enforced.

The high court decision, which aligned conservative President Donald Trump appointee Justice Neil Gorsuch with the court’s liberal justices, will limit the administration’s efforts to deport immigrants convicted of certain crimes.

The case, Sessions v. Dimaya, centered around James Garcia Dimaya, a man who legally immigrated from the Philippines. He was convicted of burglary twice and placed in deportation proceedings. An immigration judge ruled that Dimaya was eligible for deportation because his convictions qualified as an “aggravated felony” under federal statutes. The U.S. Court of Appeals for the Ninth Circuit overturned the order for deportation, and it was appealed to the Supreme Court.

The SCOTUS ruling, written by Justice Elena Kagan, questions the ambiguity surrounding the federal provision. “Does car burglary qualify as a violent felony,” Kagan writes in the ruling. “Some courts say yes, another says no.”

Justice Gorsuch concurred, writing that the Constitution “looks unkindly on any law so vague that reasonable people cannot understand its terms and judges do not know where to begin in applying it.”

In a series of tweets following the decision, President Trump called on Congress to pass legislation that would facilitate the deportation of “dangerous criminal aliens.”

The case, which originated during the Obama administration, was heard by the eight-member Supreme Court during the 2016-2017 term, but the justices were unable to reach a decision and the case was rescheduled.

On Tuesday, the Department of Homeland Security criticized the court’s ruling, saying it cripples its efforts to deport violent immigrants.

“By preventing the federal government from removing known criminal aliens, it allows our nation to be a safe haven for criminals and makes us more vulnerable as a result,” Tyler Q. Houlton, press secretary at the Department of Homeland Security, said in a statement.

E. Joshua Rosenkranz, an attorney representing James Dimaya, told The New York Times that the Supreme Court ruling will spare thousands of immigrants from deportation.

“This decision is of enormous consequence, striking down a flawed law that applies in a vast range of criminal and immigration cases and which has resulted in many thousands of immigrants being deported for decades in violation of their due process rights,” he said.