The Supreme Court Monday struck down much of a controversial immigration law passed in 2010 by the State of Arizona, but for now kept in place the part most strongly opposed by liberals: a requirement that police check the immigration status of people they stop.

In a 5-3 decision, the Court ruled that Arizona did not have the power to make it a crime for illegal immigrants to work or to arrest illegal immigrants without a warrant police thought they were in the country illegally, arguing these measures interfered with the power of the federal government to set immigration law.

But the justices affirmed the “check your papers” part of the law that requires state and local police to check the immigration status of people they suspect might be in the country illegally. The court argued that provision did not interfere with state law.

Groups such as the ACLU and the NAACP sharply oppose that provision, arguing it will lead to racial profiling of Latinos and likening it to such policies that affect African-Americans.

The ruling is mostly good news for the Obama administration, which had filed suit to block the implementation of the law and argued it was an overreach by Arizona. It also ensures that Obama won’t have face two rebukes from the nation’s highest court, which later this week  is expected to strike down at least parts of the health care law the president signed in 2010.

In terms of immigration, this decision does not resolve many of the broader issues. Republicans still strongly oppose creating any pathway to citizenship for the estimated 11 million Americans who are undocumented, while Democrats don’t support provisions that would severely punish people in the country illegally, like the Arizona law.  Neither side is likely to compromise before Election Day.

Politically, it’s not clear how much this changes the situation for Obama or Mitt Romney, who had supported the Arizona law. Romney already trails among Latino voters by around 40 points in most polls, and Latino activists have lined up strongly behind the president he  formally announced his administration won’t deport the children of illegal immigrants who were raised in the U.S.

If Romney wins the presidency, he will likely do so despite badly losing the vote of among non-white Americans.