The legal challenge to the Affordable Care Act, which I advocated as a law professor before representing the National Federation of Independent Business as a lawyer, was about two huge things: saving the country from Obamacare and saving the Constitution for the country.

On Thursday, to my great disappointment, we lost the first point in the Supreme Court’s 5 to 4 ruling to uphold the health-care law. But to my enormous relief, we won the second. Before the decision, I figured it was all or nothing. But if I had been made to choose one over the other, I would have picked the Constitution.

In November, voters can still fight Obamacare. Yet no single election could have saved the Constitution from the court.

This battle for the Constitution was forced upon defenders of limited government by Congress in 2010, when it insisted in the health-care bill that it was constitutional to require all Americans to purchase insurance or pay a fine. Lawmakers argued that this mandate was justified by the Constitution’s commerce and “necessary and proper” clauses. Had we not contested this power grab, Congress’s regulatory powers would have been rendered limitless.

They are not. On that point, we prevailed completely. Indeed, the case has put us ahead of where we were before Obamacare. The Supreme Court has definitively ruled that the commerce, necessary and proper clause, and spending power have limits; that the mandate to purchase private health insurance, as well as the threat to withhold Medicaid funding unless states agree to expand their coverage, exceeded these limits; and the court will enforce these limits.

On the commerce clause, Chief Justice John G. Roberts Jr. and four dissenting justices accepted all of our side’s arguments about why the insurance mandate exceeded Congress’s power. “The individual mandate cannot be upheld as an exercise of Congress’s power under the Commerce Clause,” Roberts wrote. “That Clause authorizes Congress to regulate interstate commerce, not to order individuals to engage in it.”

Roberts adopted this view for the precise reason we advanced: Granting Congress this power would gravely limit the liberties of the people. As he put it: “Allowing Congress to justify federal regulation by pointing to the effect of inaction on commerce would bring countless decisions an individual could potentially make within the scope of federal regulation, and — under the Government’s theory — empower Congress to make those decisions for him.”

Regarding the necessary and proper clause, supporters of the health-care overhaul had invoked the power of Congress “to make all laws which shall be necessary and proper for carrying into execution the foregoing powers,” seeing it as a constitutional carte blanche to adopt any means to facilitate the regulation of insurance companies. Roberts squarely rejected this argument: “Even if the individual mandate is ‘necessary’ to the Act’s insurance reforms, such an expansion of federal power is not a ‘proper’ means for making those reforms effective.”

For these reasons, the court held that economic mandates are unconstitutional.

As for spending power, while the court has previously invalidated statutes that exceeded the commerce clause, not since the New Deal had it rejected a law for exceeding the spending power of Congress — until Thursday. The court invalidated the part of the Affordable Care Act that empowered the Department of Health and Human Services to coerce the states by withholding Medicaid funding for existing programs unless the states accepted new coverage requirements.

All of this represents a fundamental departure from how most law professors viewed constitutional law before Thursday.

So, if we prevailed on all our arguments about economic mandates, how could the Affordable Care Act be upheld? Roberts accomplished this by rewriting the law’s “individual responsibility requirement” so that it was no longer a mandate but merely an option: get insurance or pay a mild “tax” penalty. Contrary to the statute, he ruled that anyone who did not have to pay the penalty would have no legal duty to get insurance. So, because there is no mandate, the tax penalty is constitutional.

In perhaps the most important passage of his opinion, Roberts insisted that “without deciding the Commerce Clause question, I would find no basis to adopt such a saving construction” of the penalty. This makes his analysis of the commerce clause a binding holding for future courts to follow.

True, Congress can now essentially tax people for not buying broccoli. But this power is not nearly as dangerous as the commerce power that was rejected. Congress can punish violations of its commerce power regulations with imprisonment. But under the tax power, the worst that can happen is a fine. And if lawmakers try similar legislation in the future, everyone will know that Congress is raising taxes and can fight back politically.

For more than two years, our lawsuit held Obamacare’s legitimacy in limbo — long enough for the American people to organize politically, take the House from the Democrats and thrust the issue into the center of the presidential campaign.

On Thursday, President Obama said: “The highest court in the land has now spoken.” However, there is an even higher authority that must issue its verdict on the matter: the American people. Now that the Constitution is safe, voters can achieve what we didn’t in court. Mitt Romney has made repealing and replacing the law his top priority.

“What the court did not do on its last day in session, I will do on my first day if elected president of the United States,” he reaffirmed Thursday. “And that is I will act to repeal Obamacare.”

He can also waive the collection of this tax by executive order, and the next Congress can repeal the tax using reconciliation, without the possibility of a Senate filibuster.

But voters can do something more. They can demand that the next president nominate justices who agree with the current majority of the court that Congress has only limited and enumerated powers — nominees who will enforce the original meaning of our whole Constitution, not just their favorite parts, and who, when pressured, won’t wilt from the task. If they succeed, then this decision will mark a historic turning point in constitutional law.

During the New Deal era, Americans acquiesced to an enormous expansion of federal power that they were promised would end the Great Depression. And the Supreme Court eventually expanded its interpretation of federal power accordingly. In contrast, during the Great Recession, millions of Americans were appalled by government bailouts, the horrific increases in spending and debt, and the intrusion into their lives that is coming with Obamacare. They responded by demanding a return to the Constitution’s constraints on federal power. This fall, they can demand that the next president nominate justices with the fortitude to return Congress to the original meaning of the powers provided to it by the Constitution.

For now, the president still has his signature law to campaign on, and the country still has its Constitution. Those who value our republican system of limited federal powers should put their disappointment with the decision aside and breathe a sigh of relief about the bullet we dodged and the good legal precedent we set. Then they can get to work to achieve politically the complete victory that the chief justice denied us.

Randy Barnett is a professor of constitutional law at the Georgetown University Law Center and the author of “Restoring the Lost Constitution: The Presumption of Liberty.”

Read more from Outlook, friend us on Facebook, and follow us on Twitter.