Both sides are claiming victory Monday night but the decisions is considered a win for the federal government.

The president said that no American should ever live under a cloud of suspicion just because of what they look like and went on to say that with this ruling its clear congress must act on a comprehensive immigration reform plan.

If police stop you in Arizona for jaywalking, running a stop sign or breaking any other law, they can demand proof you are here legally.

The court sympathized with Arizona's plight saying the states can assists in enforcing existing federal immigrations laws.

Justice Anthony Kennedy wrote that Arizona bears many of the consequences of unlawful immigration.

Frustrated by the flow of illegal immigrants in her state, Governor Jan Brewer signed the Arizona law back in 2010. It's been tied up in the courts since but has also spawned similar laws in Georgia, Alabama, Utah, South Carolina and Indiana. Arizona's appeal is the first to reach the Supreme Court.

The state of Arizona was vindicated the heart of the bill was upheld," Brewer said.

President Obama liked part of the ruling saying in a written statement, a patchwork of state laws is not a solution to our broken immigration system.

The Supreme Court struck down provisions that created state crimes allowing local police to arrest people for federal immigration violations.

What angers some is that the U.S. Supreme Court left intact the provision that allows local police to ask people for their papers if they're suspected of being undocumented.

"Racial profiling is the only way that you can make that you can carry out this law in Arizona ," U.S. Rep. Luis Gutierrez, (D) Illinois, said.

Those who favor tougher immigrations laws are pleased with the law.

"Give them the ability to identify illegal immigrants; it's a first step," U.S. Rep. Joe Walsh, (R) Illinois, said.

Romney said he believed that each state has the duty and the right to secure our borders and preserve the rule of law particularly when the federal government has failed to meet its responsibilities.

A second opinion with potentially important implications for the presidential campaign is expected when the court meets Thursday to issue its final ruling on President Obama's health care overhaul.

Supreme Court divided on decision

A divided Supreme Court threw out major parts of Arizona's tough crackdown on illegal immigrants Monday in a ruling sure to reverberate through the November elections. The justices unanimously approved the law's most-discussed provision -- requiring police to check the immigration status of those they stop for other reasons -- but limited the consequences.

Although upholding the "show me your papers" requirement, which some critics say could lead to ethnic profiling, the justices struck down provisions that created state crimes allowing local police to arrest people for federal immigration violations. And they warned against detaining people for any prolonged period merely for not having proper immigration papers.

The mixed outcome vindicated the Obama administration's aggressive challenge to laws passed by Arizona and the five states -- Alabama, Georgia, Indiana, South Carolina and Utah -- that followed its lead in attempting to deal with illegal immigration in the face of federal inaction on comprehensive reform.

The administration had assailed the Arizona law as an unconstitutional intrusion into an area under federal control.

Justice Anthony Kennedy, joined in his majority opinion by conservative Chief Justice John Roberts as well as three liberal justices, said the impasse in Washington over immigration reform did not justify state intrusion.

"Arizona may have understandable frustrations with the problems caused by illegal immigration while that process continues, but the state may not pursue policies that undermine federal law," Kennedy said. That part of the ruling drew a caustic dissent from Justice Antonin Scalia, who said the Obama administration doesn't want to enforce existing immigration law.

A second opinion with potentially important implications for the presidential campaign is expected when the court meets Thursday to issue its final rulings this term. The court's verdict on Obama's landmark health care overhaul probably will come that day.

In other action Monday, the court:

-- Ruled unconstitutional by a 5-4 vote state laws that require judges to impose sentences of life in prison with no possibility of parole on convicted murderers younger than 18.

-- Struck down, also 5-4, a Montana law limiting corporate campaign spending, declining to revisit the two-year-old ruling in the Citizens United case.

The Arizona decision landed in the middle of a presidential campaign in which President Barack Obama has been heavily courting Latino voters and Republican challenger Mitt Romney has been struggling to win Latino support. During a drawn-out primary campaign, Romney and the other GOP candidates mostly embraced a hard line on the estimated 11 million illegal immigrants, though Romney has lately taken a softer tone.

Obama said he was pleased that the court struck down key parts of Arizona's law but was concerned about what the high court left intact.

"No American should ever live under a cloud of suspicion just because of what they look like," the president said in a written statement. He said police in Arizona should not enforce the provision in a way that undermines civil rights.

Romney did not immediately comment on the substance of the court decision Monday, but he said, "I believe that each state has the duty -- and the right -- to secure our borders and preserve the rule of law, particularly when the federal government has failed to meet its responsibilities."

In his majority opinion, Kennedy distinguished the "show me your papers" provision from the other challenged parts of the law by pointing out that consultation between local and federal authorities already is an important part of the immigration system. Local and state police called on the Immigration and Customs Enforcement's support center more than 1 million times in 2009 alone, he said.

Kennedy said the law could -- and suggested it should -- be read to avoid concerns that status checks could lead to prolonged detention. "Detaining individuals solely to verify their immigration status would raise constitutional concerns," he said, but he did not define what would constitute too long a detention.

The vote was 6-2 against making it a state crime not to carry immigration papers and 5-3 against the other two provisions.

Justice Elena Kagan sat out the case because of her previous work in the Obama administration.

Arizona Gov. Jan Brewer said the ruling marked a victory for people who believe in the responsibility of states to defend their residents. The case, she said, "has always been about our support for the rule of law. That means every law, including those against both illegal immigration and racial profiling. Law enforcement will be held accountable should this statute be misused in a fashion that violates an individual's civil rights."

Civil rights groups that separately challenged the law over concerns that it would lead to rights abuses said their lawsuit would go on.

Even with the limitations the high court put on Arizona, the immigration status check still is "an invitation to racial profiling," said American Civil Liberties Union lawyer Omar Jadwat.

Carlos Beltran, looking for day labor work Monday in the Phoenix area, said he was glad to hear the court struck down most of the law.

"We can still be here today, find a job and go home and tell our wives we have something to eat tonight," said Beltran, who was born in the U.S. but whose parents are illegal immigrants.

With the ruling, however, Beltran said the potential for racial profiling will become worse. "I don't want to have my dad afraid of looking for a job. He has four kids. They shouldn't be afraid of trying to make a living," he said.

The Obama administration sued to block the Arizona law soon after its enactment two years ago. Federal courts had refused to let the four key provisions take effect.

The other states adopted variations on Arizona's law. Parts of those laws also were on hold pending the outcome of the Supreme Court case.

Scalia and Justice Clarence Thomas would have allowed all the challenged provisions to take effect. Justice Samuel Alito would have allowed police to arrest immigrants without papers who seek work, and also to make arrests without warrants.

Scalia, in an unusual move, pointed to facts not in the record before the court when he described Obama's recently announced plans to ease deportation rules for some children of illegal immigrants.

"The president said at a news conference that the new program is `the right thing to do' in light of Congress' failure to pass the administration's proposed revision of the Immigration Act. Perhaps it is, though Arizona may not think so. But to say, as the court does, that Arizona contradicts federal law by enforcing applications of the Immigration Act that the president declines to enforce boggles the mind," Scalia said.