The Supreme Court upheld a key provision President Obama's health care law on Thursday, ruling that federal health care subsidies are legal under the Affordable Care Act.

The 6-3 decision ensures that an estimated 6.4 million Americans will continue to receive federal tax credits under the Affordable Care Act, also known as Obamacare, and deals a significant blow to the law's Republican challengers who have been working to dismantle the law since its 2010 passage.

Writing the court's majority opinion, Chief Justice John Roberts was joined by Justices Anthony Kennedy, Ruth Bader Ginsburg, Stephen Breyer, Sonia Sotomayor and Elena Kagan, ABC News reported.

"Congress passed the Affordable Care Act to improve health insurance markets, not to destroy them," Roberts wrote in his opinion, Business Insider reported.

Conservative challengers of the law contended that the text of the law does not authorize the government to pay insurance subsidies in the 34 states where federal insurance exchanges had been set up. Rather, they argued that insurance subsidies are only allowed in the states that established their own exchanges.

The Obama administration maintained, however, that the law clearly intended to offer subsidies to people participating in both federal and state exchanges so as to cover all Americans, and the Supreme Court agreed.