The Supreme Court on Thursday ruled in favor of an illegal immigrant who was facing deportation, stating that they are entitled to discretionary relief because the government did not follow the rules.

Federal law says that an illegal immigrant in such a situation can avoid deportation at the attorney general's discretion if they have been in the U.S. for at least 10 years. The clock officially stops when they receive "a notice to appear" with information about their hearing. But in cases like plaintiff Agusto Niz-Chavez's, the government sent multiple documents containing different pieces of information. The court's majority ruled that because the law says "a" notice, that means it must be a single document.

SUPREME COURT JUSTICES GRAPPLE WITH SCHOOL SPEECH CASE OVER CHEERLEADER'S PROFANE SNAPCHAT POST

"At one level, today’s dispute may seem semantic, focused on a single word, a small one at that," Justice Neil Gorsuch wrote in the court's opinion. "But words are how the law constrains power. In this case, the law’s terms ensure that, when the federal government seeks a procedural advantage against an individual, it will at least supply him with a single and reasonably comprehensive statement of the nature of the proceedings against him."

Gorsuch led an unusual collection of justices in the 6-3 decision. Siding with him were liberal Justices Elena Kagan, Sonia Sotomayor and Stephen Breyer, as well as conservatives Amy Coney Barrett and Clarence Thomas. Justice Brett Kavanaugh penned the dissent, joined by Chief Justice John Roberts and Justice Samuel Alito.

Niz-Chavez came to the U.S. in 2005, and the Supreme Court began the removal process in 2013, after which he was ordered to leave the U.S. voluntarily or be deported. He had received two notices, one in March 2013 with his charges, and another in May 2013 with the time and place of the hearing.

GOP SENATORS SAY DEMS TRYING TO 'RIG' SCOTUS THROUGH COURT-PACKING, ASK BIDEN TO REIN IN PARTY'S 'CRAZIES'

"I find the Court's conclusion rather perplexing as a matter of statutory interpretation and common sense," Kavanaugh wrote in his dissent, noting that Niz-Chavez had received all of the necessary information by May 2013, well within the 10-year period.

The government argued that it is difficult to send all of the information in one notice, because the time or place of a hearing could change. 

"But as this Court has long made plain," Gorsuch countered, "pleas of administrative inconvenience and self-serving regulations never 'justify departing from the statute's clear text.'"

CLICK HERE TO GET THE FOX NEWS APP

Gorsuch also took a dig at government bureaucracy and the burdens it places on the general public without mercy. As an example, he described how asylum seekers have to fill out a 12-page form that comes with 14 pages of instructions, and that if they make a mistake their application could be deemed invalid and they could even risk being charged with a crime.

"If the government finds filling out forms a chore, it has good company," he wrote. "The world is awash in forms, and rarely do agencies afford individuals the same latitude in completing them that the government seeks for itself today."