WASHINGTON (Reuters) - The U.S. Supreme Court on Wednesday appeared divided over the legality of Kansas prosecuting three immigrants for violating identity theft laws by using other people’s Social Security numbers in a dispute over whether the state impermissibly encroached on federal control over immigration policy.

FILE PHOTO: The U.S. Supreme Court in Washington, D.C., U.S., June 17, 2019. REUTERS/Leah Millis/File Photo

The justices heard arguments in the state’s appeal of a 2017 Kansas Supreme Court ruling that voided the convictions of the three restaurant workers and found that a 1986 federal law called the Immigration Reform and Control Act prevents states from pursuing such prosecutions.

The case tests how state criminal laws can be used against illegal immigrants and other people who do not have work authorization in the United States. President Donald Trump’s administration backed Kansas in the case. Trump has made his hardline policies toward immigration a centerpiece of his presidency and 2020 re-election campaign.

The court’s four liberal justices as well as conservative Justice Brett Kavanaugh, a Trump appointee, asked questions that voiced concern that the state’s pursuit of these cases effectively gave it a way to go after unauthorized workers, a role reserved for the federal government.

Other conservative justices appeared inclined to accept that the state’s prosecutions were not immigration-related. The court has a 5-4 conservative majority.

Conservative Justice Samuel Alito suggested the state’s actions did not undermine federal law. “What is the conflict? The federal government doesn’t say this is contrary to our enforcement priorities,” Alito said.

Kansas has said the lower court’s ruling would undermine the state’s ability to combat identity theft. But immigrant rights groups said giving states power to prosecute employment fraud would let them take immigration policy into their own hands. Kansas is one of several conservative-leaning states that have sought to crack down on illegal immigrants.

The three men - Ramiro Garcia, Donaldo Morales and Guadalupe Ochoa-Lara - were not authorized to work in the United States and provided their employers Social Security numbers that were not their own.

A Social Security number is primarily used to identify people for employment and tax purposes. People who enter the country illegally do not get assigned Social Security numbers, which are given by the U.S. government to all legal residents.

The case centers on the employment verification process under federal immigration law requiring employers, on a form known as the I-9, to attest that an employee is authorized to work. The law also states that the form “may not be used for purposes other than for enforcement of this act.”

While the federal government has the sole authority to prosecute individuals for providing fraudulent information during the I-9 employment verification process, the state prosecuted the three men for using the same false information on different forms used to withhold wages for tax purposes.

Kavanaugh noted that Social Security numbers are asked on both form types.

“So the states would, in essence, be able to go after unauthorized employment in a pretty substantial way, notwithstanding what Congress said about giving the federal government the role with employment verification,” Kavanaugh said.

Several justices sought clarity on whether states could go after other types of fraud. Responding to liberal Justice Sonia Sotomayor, Paul Hughes, an attorney for the immigrants, said federal law would not disallow state prosecution in identity theft cases over drivers licenses, college applications or credit cards.

The state said in court papers that if the Kansas Supreme Court ruling is allowed to stand, “unauthorized aliens would enjoy a favored status, with immunity from state prosecution for violating criminal statutes that apply to everyone else.”