Washington (CNN) The Supreme Court ruled Tuesday against an unauthorized immigrant in Kansas, holding that a state could convict him of identity theft without interfering with federal immigration law.

The 5-4 ruling, with the five court conservatives in the majority, will encourage states that want to play a more active role in the area of immigration enforcement to use identity laws and similar statutes to target undocumented workers.

The decision is a win for the Trump administration, which supported Kansas in the case, and it comes as President Donald Trump has made immigration enforcement a cornerstone of his agenda.

"This ruling highlights a growing tension with respect to what states can and can't do with regard to aiding federal immigration enforcement, with some states attempting increasingly aggressive measures to supplement federal enforcement, and others attempting increasingly aggressive measures to not cooperate with federal authorities. At some point, the Justices are going to have to grapple with that tension -- but there's little of that in today's ruling," said Steve Vladeck, CNN Supreme Court analyst and professor at the University of Texas School of Law.

The case explored the tension between the federal government and states when it comes to the enforcement of issues related to immigration. It concerned undocumented individuals who used stolen or false social security numbers in an attempt to gain employment. They were prosecuted under state identity theft laws.

Justice Stephen Breyer, joined by Justices Elena Kagan, Ruth Bader Ginsburg and Sonia Sotomayor, wrote in his dissent that the decision "opens a colossal loophole."

"Starting a new job almost always involves filling out tax-withholding forms alongside an I--9. So unless they want to give themselves away, people hoping to hide their federal work-authorization status from their employer will put the same false information on their tax withholding forms as they do on their I--9," Breyer wrote.

"To let the States prosecute such people for the former is, in practical effect, to let the States police the latter. And policing the latter is what (federal law) expressly forbids."

The case comes as some Republican-led states are pushing for more strict immigration-related prosecutions and an increased role in enforcement. It could also impact, however, the debate concerning sanctuary cities and local jurisdictions with policies in place designed to limit cooperation with the federal government.

In general, when it comes to immigration, federal law supersedes state law in order to avoid a patchwork of different regulations across the country.

In the challenge at hand, Ramiro Garcia, an undocumented immigrant, used the Social Security number of someone else in order to get a job in a restaurant. After it was discovered that he had worked illegally, he was convicted under a state identity theft law.

But lawyers for Garcia challenged the conviction, arguing that he could not be convicted under state law because it is preempted by the federal Immigration Reform and Control Act of 1986 that establishes a framework for the regulation of the employment of undocumented immigrants. Under the law, an employee must submit documents establishing work authorization and an employer must attest to their employee's status.

"While Kansas may prosecute a wide range of offenses," a lawyer for Garcia told the justices, "what Kansas might not do is have its own individual immigration policy and immigration offenses. "

The Kansas Supreme Court threw out Garcia's conviction, and that of two others, holding that the state prosecution, based in part on information from a federal form, could not occur because the state law intruded on an area governed by federal law.

Kansas brought its appeal to the Supreme Court, arguing that even though its prosecution was based on information available on federal forms, that same information had been submitted to the state. It also argued that it was not interfering with the federal government, but instead enforcing its own identity theft regulation.

"We aren't targeting folks because of their status," an attorney for Kansas argued in court. "We are enforcing our employment identity theft laws, and we don't want to give special exception to people because of their status."

The state said that the lower court opinion swept too broadly, infringing upon states' rights to enforce their laws and that the opinion "defies common sense" and could lead to "serious constitutional questions about the scope of congressional power to override the States' traditionally broad police power to enact criminal laws," including those to punish identity theft.

Significantly, the federal government sides with Kansas in the case, arguing in briefs that the federal law and state law at issue are not in conflict and that the lower court ignored the fact that the state prosecution could have gone forward without ever relying upon federal forms. In briefs, Solicitor General Noel Francisco said that the lower court opinion "raises federalism concerns" and "produces untenable results" by blocking a state from enforcing identity threat prosecutions.

"Kansas' prosecutions," Francisco argued, "neither invade a federally occupied field nor conflict with Congress' purposes" in passing the federal law.

Ironically, a Supreme Court win for Kansas could open the doors for other states' efforts to regulate immigration, according to legal experts.

"What's sauce for the goose is sauce for the gander," noted Stephen Yale-Loehr, an immigration professor at Cornell Law School. "If the Supreme Court rules that the federal government no longer has sole responsibility for regulating immigration, lower courts may uphold pro-immigrant or sanctuary or noncooperation policies enacted by states and localities."

A group of immigration, labor and employment law scholars had sided with Garcia, arguing that federal law vests the federal government "with control over the documentation that may be used to demonstrate authorization for work in the United States."

"Allowing the State to impose additional and different penalties -- including those with immigration consequences -- is thus in conflict with the federal enforcement scheme," they argued.