The United States Supreme Court on Monday agreed to hear a politically explosive case on whether Obamacare is lawful, taking up a bid by 20 Democratic-led states, including New York and California, to preserve the landmark healthcare law.

The impetus for the Supreme Court case was a 2018 ruling by a federal judge in Texas that Obamacare as currently structured in light of a key Republican-backed change made by Congress violates the US Constitution and is invalid in its entirety. The ruling came in a legal challenge to the law by Texas and 17 other conservative states backed by President Donald Trump's administration.

More:

The Supreme Court's decision to intervene means the fate of the law, formally called the Affordable Care Act - the signature domestic policy achievement of former Democratic President Barack Obama, will be on the line during the ongoing presidential race.

The court is expected to hear arguments and decide the case in its next term, which starts in October and ends in June, meaning a ruling is unlikely before the November 3 election, in which Trump is seeking a second term in office.

The justices did not act on a similar appeal brought by the Democratic-led House of Representatives but did agree to take up a separate appeal brought by the conservative states that want the law struck down.

The coalition of states has asked the Supreme Court to overturn a December 18 ruling by the New Orleans-based 5th US Circuit Court of Appeals that declared that the law's "individual mandate" that required people to obtain health insurance ran afoul of the Constitution. The 5th Circuit ruling came in an appeal of US District Court Judge Reed O'Connor's prior ruling that the entire law must fall.

The Supreme Court has a 5-4 conservative majority that includes two justices appointed by Trump. In 2012, it ruled 5-4 to uphold Obamacare. All five justices in the majority in that case - four liberals and conservative Chief Justice John Roberts - remain on the court. For the law to be struck down this time, Roberts likely would have to reverse course and join the other conservatives.

Key questions unanswered

The Democratic-backed law was signed by Obama in 2010 over strenuous Republican opposition.

In the lawsuit led by Texas, O'Connor ruled that the entire law was unconstitutional. The 5th Circuit, however, avoided answering the key question of whether the rest of the law can remain in place or must be struck down, instead sending the case back to O'Connor to reconsider. The Supreme Court will now decide the issue.

Obamacare has helped roughly 20 million Americans obtain medical insurance either through government programmes or through policies from private insurers made available in Obamacare marketplaces. Republican opponents have called the law an unwarranted intervention by the government in health insurance markets.

In the 2012 case, the Supreme Court upheld most Obamacare provisions, including the individual mandate, which required people to obtain insurance or pay a financial penalty. The court defined this penalty as a tax and thus found the law permissible under the constitution's provision empowering Congress to levy taxes.

In 2017, Trump signed into law a tax bill passed by a Republican-led Congress that eliminated the financial penalty under the individual mandate, which gave rise to the new Republican lawsuit. The tax law meant the individual mandate could no longer be interpreted as a tax provision and is therefore unlawful, the Republican challengers argued.