obamacareupheld400
Cheering SCOTUS decision (Alex Wong/Getty Images)

(The Root) -- Just before the Supreme Court heard arguments on the constitutionality of the Affordable Care Act in March, I asked Cecilia Munoz, director of the White House Domestic Policy Council, if the Obama administration had a plan B if the high court struck down the law's individual mandate. She wouldn't divulge.

"We're not thinking about or planning for a moment when those provisions are not in the law," she said perkily. "We really are quite confident that the Supreme Court is going to uphold it."

Turns out Munoz was right. On Thursday the Supreme Court ruled in favor of the Affordable Care Act 5-4, arguing that, yes, the federal government can require you to buy health insurance or face a fine.

In upholding the health care reform law's individual mandate, the court cast the penalty for those who refuse to purchase health insurance as a tax, arguing that Congress has that authority.

As Chief Justice John Roberts said in the decision: "Our precedent demonstrates that Congress had the power to impose the exaction in Section 5000A [the individual mandate] under the taxing power, and that Section 5000A need not be read to do more than impose a tax. This is sufficient to sustain it."

With regard to the other part of the law that was in question -- ACA's expansion of Medicaid, to cover anyone with incomes of less than 133 percent of the poverty level -- the court ruled that the expansion is constitutional, but only with conditions.

Under the U.S. Constitution's Spending Clause, the federal government has the power to give the states more money for Medicaid, in return for the requirement that they provide more low-income people with access to health care. What the court ruled that the government is not allowed to do, however, is strip states of their existing Medicaid funding if they do not expand Medicaid. Those states, in other words, can continue to receive funds for the rest of the program.

As Justice Roberts put it: "Nothing in our opinion precludes Congress from offering funds under the ACA to expand the availability of health care, and requiring that states accepting such funds comply with the conditions on their use. What Congress is not free to do is to penalize States that choose not to participate in that new program by taking away their existing Medicaid funding."

So in the end, the entire Affordable Care Act is constitutional. Although the Supreme Court rejected the government's argument that the individual mandate is fair game under the Commerce Clause (the part of the Constitution that gives the federal government authority to regulate multistate economic activity), it was nonetheless allowed to stand on the grounds that the penalty that one must pay if one refuses to buy insurance is a tax that Congress is authorized to impose.

Full implementation of the law will continue, and the plan for barring insurers from denying coverage to people with pre-existing conditions is still on track. The 3.1 million young people who are already being allowed to stay on their parents' health care plans will remain insured, and seniors who have already been receiving 50 percent discounts on brand-name drugs will keep those discounts.

Glenn Cohen, professor of law and co-director of the Center for Health Law Policy, Biotechnology and Bioethics at Harvard University, reasoned that, even if the court's specific rationale was not ideal for the Obama administration, it's still a victory for him.

"The best possible thing would have been for it to have been upheld as an exercise of the Commerce Clause power because now Mitt Romney gets to say, 'Look at the president increasing taxes -- he didn't want to call it a tax before, but the Supreme Court called it as it was,'" Cohen told The Root. "But at the end of the day, this is a very good day for the president."

Cynthia Gordy is The Root's senior political correspondent.

Like The Root on Facebook. Follow us on Twitter.