WASHINGTON — The US Supreme Court upheld President Barack Obama's healthcare law Thursday in an election-year triumph for him and fellow Democrats and a stinging setback for Republican opponents of the most sweeping overhaul of the unwieldy US healthcare system in about a half century. In a 5-4 ruling based on the power of Congress to impose taxes, the court preserved the law's “individual mandate” requiring that most Americans obtain health insurance by 2014 or pay a tax. Opponents of the law had argued the mandate was an overreach by the federal government into the private lives of citizens. The court was deeply divided on this issue, but the majority ruled that Congress' taxing power was more important. The law's “requirement that certain individuals pay a financial penalty for not obtaining health insurance may reasonably be characterized as a tax,” Chief Justice John Roberts wrote for the court's majority. “Because the Constitution permits such a tax, it is not our role to forbid it, or to pass upon its wisdom or fairness,” wrote Roberts, who was joined by the four most liberal members — Justices Ruth Bader Ginsburg, Stephen Breyer, Elena Kagan and Sonia Sotomayor — in upholding the law's key provision. Obama said the ruling was a victory for the American people, and promised to implement it and improve upon it going forward. “The highest court in the land has now spoken. We will continue to implement this law and we'll work together to improve on it where we can,” Obama said at the White House. “What we won't do — what the country can't afford to do — is re-fight the political battles of two years ago or go back to the way things were. With today's announcement, it's time for us to move forward.” The healthcare law, known formally as the Patient Protection and Affordable Care Act, is the biggest overhaul of the $2.6 trillion healthcare system since the 1960s. It was signed by Obama in March 2010 and immediately put to the test in the courts by 26 of the 50 states and a trade group. The court's decision largely vindicates a sweeping attempt to fix a system that, while representing nearly 18 percent of the economy, leaves 16 percent of Americans uninsured, a failure that sets the United States apart in the industrialized world. The US system, unlike other rich countries, is a patchwork of private insurance and restrictive government programs. The US pays more for healthcare than any other country but tens of millions of people remain with no insurance at all. The court's ruling could figure prominently in the run-up to the Nov. 6 election. Obama, seeking a second four-year term, is being challenged by Republican Mitt Romney, who had called for scrapping the law and replacing it with other measures even though he championed a similar approach at the state level as Massachusetts governor. Romney said after the ruling that the American people must defeat Obama in the election in order to overturn the law. “This is a time of choice for the American people. If we're going get rid of ‘Obamacare' we're going to have to replace President Obama. My mission is to make sure we do exactly that,” said Romney, speaking with the US Capitol as a backdrop. — Reuters