WASHINGTON - A U.S. law requiring the deportation of immigrants convicted of certain crimes of violence is unconstitutionally vague, the Supreme Court ruled on Tuesday, in a decision that could hinder the Trump administration’s ability to step up the removal of immigrants with criminal records.

The court, in a 5-4 ruling in which President Donald Trump’s conservative appointee Neil Gorsuch joined the four liberal justices, invalidated the provision in the Immigration and Nationality Act and sided with convicted California burglar James Garcia Dimaya, a legal immigrant from the Philippines.

The ruling, written by liberal Justice Elena Kagan, was decried by the administration, which had defended the provision.

Federal authorities had ordered Dimaya deported after he was convicted in two California home burglaries in 2007 and 2009. Neither burglary involved violence.

Kagan said ambiguity surrounding the crimes of violence provision created confusion in lower courts. “Does car burglary qualify as a violent felony?” Kagan wrote. “Some courts say yes, another says no.” Kagan mentioned other examples including evading arrest and trespassing in which courts have also been divided.

The court’s ruling will not affect a number of serious crimes, including murder, rape, counterfeiting or terrorism offenses, which are specifically listed in the law as grounds for deportation, several immigration attorneys said. That could limit its impact, though the government does not provide data on which crimes trigger the most deportations.

Immigration attorneys are uncertain how many pending deportations will be affected by the ruling, but “it’s certainly not a tidal wave,” said Kathy Brady, a senior staff attorney at the Immigrant Legal Resource Center.

Gorsuch, in a concurring opinion, wrote that the American colonies in the 18th century cited vague English law like the crime of treason as among the reasons for the American revolution.

“Today’s vague laws may not be as invidious, but they can invite the exercise of arbitrary power all the same - by leaving the people in the dark about what the law demands and allowing prosecutors and courts to make it up,” Gorsuch added.

FILE PHOTO: U.S. Supreme Court Justice Neil Gorsuch participates in taking a new group photo with his fellow justices at the Supreme Court building in Washington, D.C., U.S., June 1, 2017. REUTERS/Jonathan Ernst/File Photo

It was not entirely surprising that Gorsuch would break with the four other conservatives on the court and vote to strike down the provision. Gorsuch is ideologically aligned with the late conservative Justice Antonin Scalia, whom he replaced on the court last year. Scalia wrote a 2015 ruling that was invoked in Tuesday’s decision that found that a similar provision in a federal criminal sentencing law was overly broad.

Gorsuch interpreted the immigration provision based on the original understanding of the Constitution, a view held by many conservative jurists.

‘SAFE HAVEN FOR CRIMINALS’

“Today’s ruling significantly undermines DHS’s efforts to remove aliens convicted of certain violent crimes, including sexual assault, kidnapping and burglary, from the United States,” U.S. Department of Homeland Security spokesman Tyler Houlton said.

“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,” Houlton added.

Trump called on Congress to pass legislation. “Today’s Court decision means that Congress must close loopholes that block the removal of dangerous criminal aliens, including aggravated felons,” Trump said on Twitter.

The Supreme Court upheld a 2015 lower court ruling that the provision requiring Dimaya’s deportation created uncertainty over which crimes may be considered violent, risking arbitrary enforcement in violation of the U.S. Constitution.

The court issued the ruling at a time of intense focus on immigration issues in the United States as Trump seeks to increase deportations of immigrants who have committed crimes, though it was former President Barack Obama’s administration that sought to deport Dimaya.

Dimaya’s attorney, Joshua Rosenkranz, said the decision strikes down a law that has over decades led to the deportation of thousands of immigrants. “The Supreme Court delivered a resounding message today: You can’t banish a person from his home and family without clear lines, announced up front,” Rosenkranz said.

Dimaya came to the United States from the Philippines as a legal permanent resident in 1992 at age 13. He lived in the San Francisco Bay area.

In 2010, the government sought to deport him and a Justice Department board refused to cancel his expulsion. In the federal criminal code, a “crime of violence” includes offenses in which force either was used or carried a “substantial risk” that it would be used.

In a dissenting opinion on Tuesday, conservative Chief Justice John Roberts said the immigration law provision at issue should have been upheld. Roberts said the ruling will have significant ramifications because the same crime of violence definition is used in numerous other laws, including using or carrying firearms during a violent crime, and could call into question convictions under them.

The Supreme Court heard arguments in the case on Oct. 2, the first day of its current nine-month term. The court initially heard arguments in January 2017 when it was one justice short, but decided last June after Gorsuch brought the court to full strength to have the case re-argued, putting him in a position to cast the deciding vote.