Image caption The oral arguments brought protesters on both sides of the issue into the street outside the court

Outside the US Supreme Court on Wednesday, hundreds of protesters gathered to express their views on a law that has fuelled passions in the ongoing national debate over immigration.

One man held a large placard aloft which read: "Exporting illegals = importing jobs for Americans!"

Close by, Roman Catholic bishops joined several Hispanic and other groups to warn Arizona's law, known as SB1070, would encourage racial profiling.

Inside, Solicitor General Donald Verilli, arguing for the Obama administration in opposing the law, clarified that the federal government's case rests not on arguments about racial profiling or civil rights but on the fundamental legal principle that the federal government alone looks after immigration.

"Arizona is pursuing its own policy of attrition through enforcement," he said. "The constitution invests exclusive authority in the federal government."

Federal law, he said, pre-empts such state laws, which contradict and complicate Washington's efforts at a comprehensive policy on immigration.

He noted immigration policy also weighs foreign policy considerations.

Mexico is among those countries to have expressed opposition to the Arizona law, which it said discriminated against its citizens.

Arizona has a 370-mile (595km) border with Mexico and it is across this section of America's southern border that many illegal immigrants enter.

They account for an estimated 6% of the state's population, putting a great burden, the state argues, on its prisons, schools, hospitals and other resources.

Arizona has inspired other states to action. Five of them - Alabama, South Carolina, Georgia, Indiana and Utah - have adopted similar laws and others are considering their own immigration measures.

The Supreme Court's decision will have an impact on these state laws, parts of which have also been blocked.

'Not selling well'

The state of Arizona wants the Supreme Court to find as constitutional four sections of its 2010 law that were blocked by lower courts.

These include the requirement that police verify the immigration status of anyone stopped or arrested for another violation if they have "reasonable suspicion" the person is in the US illegally.

Image caption Paul Clement, who argued for Arizona, appeared to get a sympathetic reception

The state's lawyer, Paul Clement, appeared to gain a sympathetic hearing on this from the conservative-dominated court.

He pressed the case that Arizona "bears a disproportionate share of the costs of illegal immigration" and that far from challenging federal law, Arizona was merely enforcing it, where the government had failed.

At one point, Chief Justice John Roberts exclaimed: "It seems to me that the federal government just doesn't want to know who's here illegally and who's not."

Even Justice Sonia Sotomayor, an appointee of President Obama, told Mr Verilli of his argument: "You can see it's not selling very well."

If the justices indicated that they would uphold this part of Arizona's law, it was less clear how they would vote on the provisions which make it a state crime not to produce registration documents upon request or to seek work if in the US illegally.

Last year the Supreme Court upheld an Arizona law allowing officials to revoke the licenses of businesses employing illegal immigrants.

Eight justices heard this case. Justice Elena Kagan recused herself because she was a lawyer in the Obama administration before President Obama appointed her to the Supreme Court.

A decision on this law is expected in June, along with one on whether President Obama's controversial healthcare law can stand. As with that, this ruling has the potential to affect the political landscape in the election year.

Mr Obama has been courting Latino voters, a significant part in the bloc that elected him president in 2008. There are an estimated twelve million of them and many live in western swing states. In Arizona, Latinos could put the state into play for the Democrats for the first time since 1996.

Presumptive Republican nominee Mitt Romney has toned down the tough stance he adopted on illegal immigration during the Republican primaries.

He too eyes the votes of Latinos who appear to have been put off by the strident anti-illegal-immigration rhetoric of the Republican primary campaign.