The Colorado Supreme Court on Tuesday struck down the state’s law banning immigrant smuggling, saying that the issue is one only for the federal government to police.

Colorado Attorney General Cynthia Coffman said in a statement that she plans to appeal the decision to the U.S. Supreme Court.

The law, passed in 2006, made it a felony to provide transportation in exchange for money, “for the purpose of assisting another person to enter, remain in, or travel through the United States or the state of Colorado in violation of immigration laws.”

There is a similar federal law, though. In a 4-3 decision Tuesday, the state’s highest court concluded that the federal immigration law should take precedence and block the state from implementing its own versions of immigration laws.

“The Colorado statute disrupts Congress’s objective of creating a uniform scheme of punishment because some smuggling activities involving unauthorized aliens are now punishable in Colorado but not elsewhere,” Justice Richard Gabriel, the author of the majority opinion, wrote.

Gabriel’s opinion relied heavily on a 2012 U.S. Supreme Court decision that found certain state immigration laws passed in Arizona were invalid. The decisions hinge on the legal principle of preemption. In matters where the federal government has exclusive authority — or in matters where a state law interferes with enforcement of a federal law — the federal law reigns supreme.

The majority opinion cited a number of cases arguing that the federal government has effectively preempted state action in the field of immigration law.

“This framework is so pervasive that it has left no room for the states to supplement it,” Gabriel wrote in the opinion.

Three justices, led by Justice Allison Eid, disagreed.

In its version of the smuggling statute, federal law requires the government to prove that the people being transported were in the country illegally. Colorado’s law doesn’t — requiring only that prosecutors prove that defendants thought they were transporting immigrants illegally. Eid and her two colleagues argued that Colorado’s law, then, is separate enough from immigration law to be allowed to stand.

“The majority … misses the point of Colorado’s human smuggling statute, which is to protect, not punish, the passengers of human smuggling operations regardless of their immigration status,” Eid, who has been nominated by President Donald Trump to sit the federal 10th Circuit Court of Appeals, wrote in her dissent.

The Colorado law was born during a 2006 legislative session that featured heated debates on immigration — and occurred amid a series of crashes on Colorado roads involving overloaded vehicles smuggling immigrants. The law passed with bipartisan support but not without criticism from groups that argued the bill was one of a number that year prompted by anti-immigrant sentiment.

On Tuesday, Denver immigration attorney Hans Meyer called the law, “one of the last ugly vestiges” of the 2006 session.

“The majority of those laws have either been repealed or struck down,” he said.

Brendan Greene, the campaigns director at the Colorado Immigrant Rights Coalition, said in a statement Tuesday that the law criminalized, “those who engage in daily interactions with people in the undocumented community.”

It is unclear how often prosecutors have used the law since its passage. The particular case before the Colorado Supreme Court involved a man named Bernardino Fuentes-Espinoza, who was convicted of accepting $500 in 2007 to transport several people to Kansas from Arizona and who was arrested midtrip in Wheat Ridge. The court ruled that Fuentes-Espinoza’s conviction should be thrown out.

In a statement, Coffman said she disagrees with the ruling and would appeal it to the U.S. Supreme Court.

“Colorado’s human smuggling law was not designed to interfere with federal immigration policy, unlike some other state laws that have been struck down by courts,” Coffman said. “Our laws were enacted to serve the important purpose of protecting and vindicating the innocent victims of serious crimes.”