The White House on Wednesday urged Congress to “fix loopholes” in a law used to deport noncitizens who commit felonies that was partly struck down Tuesday by a divided Supreme Court.

“Unless Congress acts, the United States Government will be unable to remove from our communities many noncitizens convicted of violent felonies, including in some cases domestic assault and battery, burglary, and child abuse,” White House press secretary Sarah Huckabee Sanders said in a statement on the ruling that drew President Trump’s ire. “It is a matter of vital public safety for Congress to act now.”

The court ruled that the law in question was unconstitutionally vague, with the newest justice, Neil M. Gorsuch, joining the court’s liberal members in the 5-to-4 decision.

Justice Elena Kagan wrote that the part of the Immigration and Nationality Act was so “fuzzy” over what constitutes the kind of aggravated felony that requires an immigrant’s deportation that it violated the constitutional protection of due process.

She was joined by the court’s consistent liberals — Justices Ruth Bader Ginsburg, Stephen G. Breyer and Sonia Sotomayor — as well as Gorsuch, who has just celebrated his first anniversary on the court after being nominated by Trump.

The decision prompted a series of tweets on Tuesday night from Trump, who is at his Mar-a-Lago estate in Florida for meetings with Japanese Prime Minister Shinzo Abe.

The decision drew a rebuke from President Trump, who tweeted Tuesday: “This is a public safety crisis that can only be fixed by ... Congress — House and Senate must quickly pass a legislative fix to ensure violent criminal aliens can be removed from our society. Keep America Safe!”.

In her statement, Sanders warned of “danger posed by congressional inaction.”

The case was brought by James Garcia Dimaya, a citizen of the Philippines admitted to the United States as a lawful permanent resident in 1992 when he was 13 years old.

In 2007 and 2009, Dimaya was convicted of residential burglary. The Department of Homeland Security determined that his crimes could be considered crimes of violence and thus were aggravated felonies that made him eligible for deportation.

But after the Johnson decision, lawyers for those slated for deportation challenged a catchall provision of the immigration law. It defined as crimes of violence offenses that involve “a substantial risk that physical force against the person or property of another may be used in the course of committing the offense.”

The U.S. Court of Appeals for the 9th Circuit said that deciding whether Dimaya’s burglaries fit that description required improper speculation.