WASHINGTON, June 28 (Reuters) - The U.S. Supreme Court isset to deliver on Thursday its ruling on President BarackObama's 2010 healthcare overhaul, his signature domestic policyachievement, in a historic case that could hand him a hugetriumph or a stinging rebuke just over four months before heseeks re-election.

The nine justices are scheduled to take the bench at 10 a.m.(1400 GMT) on the last day of the high court's term to readtheir final opinions, including their decision in the epic legalbattle over the healthcare law.

The U.S. healthcare system's biggest overhaul in nearly 50years, the law aimed to provide medical insurance to more than30 million previously uninsured Americans and to slow downsoaring medical costs. The United States spends more onhealthcare than any other nation, but about 50 million of theroughly 310 million Americans have no insurance at all.

Obama seeks re-election on Nov. 6 against Republicanchallenger Mitt Romney, who has called for scrapping the law andreplacing it with other measures even though he championed asimilar approach at the state level as Massachusetts governor.

Republicans and Democrats alike eagerly awaited the rulingand were sure to try to use the court's decision - whatever itmay be - to their political advantage in the coming months.

A key component of the law was challenged by 26 of the 50states and by a trade group for small businesses on the groundsthat Congress exceeded its powers under the U.S. Constitution byrequiring people to obtain insurance by 2014 or pay a penalty.

The justices could uphold the entire law, strike downcertain provisions or overturn the whole law in a ruling thatcould reshape the federal government's powers versus the states.

"If the court invalidates any of the law's provisions, itcould be one of the most important federalism rulings from thecourt - and one of the most dramatic confrontations between thecourt and the president - since the 1930s," said Daniel Conkle,an Indiana University law school professor.

Obama and his fellow Democrats expended a great deal ofenergy and political capital in securing congressional passageof the measure over unified Republican opposition. The law isreviled by conservatives, who dubbed it "Obamacare." Critics sayit meddles in people's lives and in the business of the states.

The ruling also will be closely watched on Wall Street, withwide ramifications for the health sector. It could affect thestock prices of health insurers, drugmakers, device companiesand hospitals.

A DEFINING MOMENT

The decision could be a defining moment for Obama'spresidency and for Chief Justice John Roberts, who was appointedto the Supreme Court in 2005 by then-President George W. Bush.In the past, Roberts often has endorsed more narrow rulings thatbridge the ideological differences on the closely divided court.

The nine justices are split ideologically and politically.Roberts and the four other conservatives, who often make up amajority, were appointed by Republican presidents. The fourliberals, who often dissent, were named by Democraticpresidents, including Obama.

The healthcare battle has been the most politically chargedcase before the Supreme Court since 2000, when the justiceshalted the Florida vote recount in a ruling that gave theRepublican Bush the presidency over Democrat Al Gore.

About 56 percent of Americans said they opposed thehealthcare law in a Reuters/Ipsos poll released on Sunday. Whenasked about individual provisions, however, most respondentssaid they strongly supported them, except for the individualinsurance purchase mandate, which was opposed by 61 percent ofthose surveyed.

On other parts of the law, 82 percent favored banninginsurers from denying coverage to people with pre-existingmedical conditions; 61 percent backed letting children stay ontheir parents' insurance until age 26; and 72 percent supportedrequiring companies with more than 50 workers to offerinsurance.

The Supreme Court's mixed ruling on Monday on Arizona'scrackdown on illegal immigrants could foreshadow a similarconciliatory result in healthcare that does not fall alongpredictable ideological lines.

The justices upheld police stops of people suspected ofbeing in the country illegally, but struck down three otherprovisions of the state law in a ruling that left Obama andArizona's Republican Governor Jan Brewer able to claim partialvictories.

The immigration and healthcare cases involved battles thatpitted the Democratic Obama administration againstRepublican-led states and tested where to draw the line in thedivision of powers between the federal government and thestates.

The Supreme Court cases are National Federation ofIndependent Business v. Sebelius, No 11-393; U.S. Department ofHealth and Human Services v. Florida, No. 11-398; and Florida v.Department of Health and Human Services, No. 11-400.

(Additional reporting by Joan Biskupic; Editing by HowardGoller and Will Dunham)