The Supreme Court upheld a key part of Arizona's tough anti-illegal immigration law in a 5-3 decision on Monday that allows police officers to ask about immigration status during stops. That part of the law, which never went into effect because of court challenges, will now immediately be enforced in Arizona. Other parts of the law, including a provision that made it a state crime for illegal immigrants to seek work, will remain blocked, as the justices affirmed the federal government's supremacy over immigration policy.

[Yahoo News reporter Liz Goodwin will be answering your questions about the Supreme Court's immigration ruling today at 4 p.m. ET on Facebook.]

Justice Anthony Kennedy, the court's swing vote, wrote the opinion, and was joined by Chief Justice John Roberts, Ruth Bader Ginsburg, Stephen Breyer and Sonia Sotomayor. Conservative Justices Antonin Scalia, Samuel Alito and Clarence Thomas partially dissented, saying the entire law or most of the law should have been upheld.

In the opinion, Justice Kennedy wrote that the federal government's "power to determine immigration policy is well settled." But he also showed concern for what he described as Arizona's outsize burden in dealing with illegal immigration, seeming to sympathize with the state's decision to butt in on immigration enforcement. "Arizona bears many of the consequences of unlawful im­migration," he wrote. "Hundreds of thousands of deportable aliens are apprehended in Arizona each year." But, ultimately, the justices found that Arizona cannot mete out its own state punishments for federal immigration crimes.

"Arizona may have under­standable frustrations with the problems caused by illegal immigration while that process continues, but the State may not pursue policies that undermine federal law," Kennedy wrote in the opinion's conclusion.

The police immigration checks are allowed, however, because state police would simply flag federal authorities if they found an illegal immigrant. The federal government would then decide if they wanted to try to deport the suspect, or let him or her go. Kennedy did not rule out that these checks may be implemented in an illegal way, which means more lawsuits may be forthcoming.

Story continues

Nevertheless, Arizona Gov. Jan Brewer cast the decision as a "victory" for the state. "I am confident our officers are prepared to carry out this law responsibly and lawfully. Nothing less is acceptable," she said in a statement, adding that officers have been trained not to racially profile in their stops.

Erika Andiola, an activist and undocumented immigrant in Arizona, said that the Latino community will not be happy with the decision, as the immigration checks portion of the law was most unpopular with them. "It's another message to the Latino community that if you look brown you're a perfect target for the police," she said.

The Obama administration sued to block Arizona's law, called SB1070, shortly after it passed two years ago, saying it interfered with federal authority over immigration. The law made it a state crime for illegal immigrants to seek work or fail to carry proper immigration papers. It also requires police officers to check immigration status and make warrantless arrests for immigration crimes in some cases. A federal judge prevented those aspects of the law from going into effect, but the law became a lightning rod around the country, sparking boycotts and counterboycotts and opening up a debate about the nation's illegal immigrant population.

In oral arguments in April, many of the justices seemed deeply skeptical of the government's argument that local police officers would interfere with federal authority over immigration law if they began asking people about their immigration status during stops. Though much of the debate around the law has focused on "racial profiling"—whether Hispanic people would be stopped and questioned by police based on their ethnicity—the government did not even mention those words in its case against the law, instead focusing on the federal government's supremacy in immigration matters. Justices repeatedly criticized the government's argument against immigration checks. Even Sotomayor, part of the court's liberal wing, said she was "terribly confused" by the government's argument against the checks.

But the liberal justices showed much more hesitation over the parts of the law that made federal immigration crimes into state crimes, which have all now been struck down. Sotomayor singled out the state law against illegal immigrants seeking work, noting that Congress had explicitly rejected a similar law in its immigration legislation, instead choosing to target employers who hire unauthorized workers.

Five states including Alabama followed Arizona's lead and passed similar laws last year, while similar bills failed in more than two dozen other state legislatures. The decision suggests that any state laws that make federal immigration offenses into state crimes will not stand. But it remains to be seen if the outcome will encourage more states to pass laws that make local police officers check immigration status.

The law also became an issue in the presidential race, with Mitt Romney bringing on the law's author, Kris Kobach, as an immigration adviser, and embracing the law's purpose, "self-deportation," as his immigration enforcement strategy. He said in February that he would drop the suit against the law.

In Arizona v. U.S., Justice Elena Kagan recused herself because she was solicitor general when the Obama administration filed suit against the law. If the court had split 4-4, the U.S. Court of Appeals for the Ninth Circuit's decision blocking the four major provisions of the law would have stood.