(CNN) The Supreme Court on Tuesday invalidated a provision of federal law that requires the mandatory deportation of immigrants who have been convicted of some "crimes of violence," holding that the law is unconstitutionally vague.

The case, Sessions v. Dimaya, had originated during the Obama administration but had been closely watched to see if the justices would reveal how they will consider the Trump administration's overall push to both limit immigration and increase deportations.

As expected after the oral argument, Justice Neil Gorsuch joined with the more liberal justices for the first time since joining the court to produce a 5-4 majority invalidating the federal statute. In doing so, Gorsuch was continuing the jurisprudence of Justice Antonin Scalia, who also sided with liberals when it came to the vagueness of statutes used to convict criminal defendants.

Only eight justices heard the case last term after Scalia's death, and in late June, the court announced it would re-hear arguments this term, presumably so that Gorsuch could break some kind of a tie.

President Donald Trump reacted to the ruling on Twitter on Tuesday evening, writing, "Today's Court decision means that Congress must close loopholes that block the removal of dangerous criminal aliens, including aggravated felons. 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!"

Read More