One of the most striking features of the opposition to the Trump administration’s initial executive order against migrants from seven majority-Muslim countries as well as all refugee claims is how important state governments were to it. The lawsuit that led to a nationwide injunction against the order was filed by the state of Washington, later joined by Minnesota. Seventeen other states joined a brief supporting Washington and Minnesota. This is strange on its face. Setting aside the disputed question of how much unilateral authority the president has over immigration policy relative to Congress and the federal judiciary, it at least seems clear that immigration policy is a federal matter, not the business of the states. Individual persons affected by the ban might sue on the basis of religious discrimination, national origin discrimination, or lack of due process, but why are the states involved?

The answer is twofold. The states sued on behalf of their citizens and residents whose rights were affected, and also on their own behalf as governments (particularly as governments that operate public university systems that would be harmed by the ban; I’ll return to the topic of universities in another piece). That is to say, the states claimed simultaneously to protect the individual rights of their inhabitants, and the corporate autonomy of the states themselves. Their suits relied on the First Amendment and the Religious Freedom Restoration Act’s guarantee of freedom of religion, as well as on the Tenth Amendment’s guarantee of state authority.

This is a fortunate reminder of how federalism works at its best. Ever since the Warren Court we have been all too used to an opposition between individual rights and states’ rights: individual persons appeal to the federal courts to stop violations of liberty or equality by state governments. The opposition was frequently real, and the appeals frequently justified.

More than sixty years ago, the legal scholar Herbert Wechsler argued that “the political safeguards of federalism” could do what needed to be done by way of protecting the states’ role in the constitutional system. Senators are elected by state, as are members of the Electoral College. Districting for the House of Representatives is done by the states. The American federation is not one of some national majority governing at the center and threatening the autonomy of the several states; the states are directly involved in the creation and makeup of the national government. That direct participation in federal institutions is supplemented by the states’ ability to act as lobbying interest groups. In light of all this, the dominant view among liberal legal scholars for two generations was, as Jesse Choper later argued, that the national political process could sort out the balance of state and federal authority, without judicial intervention.

Very roughly speaking, what followed was a long-term ideological dispute in which conservatives were interested in the judicial protection of state autonomy, the ability of the states to govern themselves (that is to say, their inhabitants) internally, and liberals emphasized state power to shape national politics, primarily through the elected branches of the federal government. Conservatives preferred policy divergence—local majorities enacting their democratic will—whereas liberals aimed at state cooperation in policy implementation.

These sides were very approximate indeed, and could easily switch when party control did. Federalist principles tend to fall away from the party that controls the presidency and the White House. As I’ve explained, I don’t really think that such hypocrisy is as important as it’s made out to be. Principles that are hypocritically endorsed are better than no principles at all; a reason, once it’s been articulated as a reason rather than as a preference, has a meaning that is broader than the speaker’s subjective preference. So it’s no surprise to find that rules about federalism articulated by a conservative Supreme Court—a rule against the commandeering of local law enforcement personnel to enforce federal gun control, a rule against financial coercion of the states to adopt Obamacare—apply directly to the protection of sanctuary states and cities that refuse to cooperate with the persecution of immigrants. The sides may switch and yet each can contribute to building sound principles that outlast their hypocrisy. I don’t mind today’s federalists-come-lately, and I’m glad that yesterday’s federalists left behind useful resources for them to use.

What’s more interesting than people switching sides is the dichotomy between thinking of the states as autonomous inward-facing governments implementing diverse policies and thinking of them as powerful outward-facing participants in national politics. I have argued elsewhere that constitutional federalism involves both of these (as well as some guarantee that the states can’t be redrawn or abolished by the central government). Decentralized units that can’t autonomously govern become vestigial organs in a constitutional system, sites for cronyism and clientelism, inefficient delivery mechanisms for federally provision. And decentralized units that don’t have a direct share in governing authority are too weak to meaningfully defend themselves against federal incursion. Federalism includes states or provinces that can do both.

Whether that federalism is normatively attractive or not depends on what all those different levels of government do, of course. It’s perfectly possible to be oppressed by two levels of government at once, as African-Americans were through most of the Jim Crow era. (Washington became their ally only very late in the day.) But the American Founders hoped for something different:

“In a single republic, all the power surrendered by the people is submitted to the administration of a single government; and the usurpations are guarded against by a division of the government into distinct and separate departments. In the compound republic of America, the power surrendered by the people is first divided between two distinct governments, and then the portion allotted to each subdivided among distinct and separate departments. Hence a double security arises to the rights of the people. The different governments will control each other, at the same time that each will be controlled by itself.” (Madison as Publius, Federalist #51)

The system is justified (if at all) with reference to the rights of the people. The states will be powerful enough to check federal overreach, for the sake of those rights. And the states may be limited for the sake of those rights, a hope that only became a federal promise with the passage of the Thirteenth, Fourteenth, and Fifteenth Amendments. The “double security” moreover notes the separation of powers within each level—and here is it useful to remember that the states were only able to intervene in the immigration case by appearing in a federal court.

Federalism isn’t only valuable, or only liberal, because it brings lawmaking closer to the people. The local governing autonomy of the states is a mixed blessing, as Madison knew; local majorities can sometimes be the most oppressive. But we shouldn’t only think of the states’ outward-facing capacities as taking part in elections or looking for federal handouts. A central theme of my scholarship on federalism for many years has been: federalism is valuable because states can be oppositional. They can provide organizational, institutional, and political strength that is otherwise hard to come by in the face of a tremendously powerful central government. They are units that can say ”no”,  and can help give people who say “no” a place to stand. They say “no” only partly to protect their own governing autonomy. It’s impossible to cabin off political power that neatly; states that are strong enough to defend their own inward jurisdiction are also strong enough externally to shape what happens overall. “The different governments control each other,” Madison wrote: not merely bound or limit, but control. If they didn’t, if they couldn’t, the “rights of the people” would be a great deal less secure.

Jacob T. Levy is Tomlinson Professor of Political Theory and Director of the Yan P. Lin Centre for the Study of Freedom and Global Orders in the Ancient and Modern Worlds at McGill University; author of Rationalism, Pluralism, and Freedom; a blogger at Bleeding Heart Libertarians; and a Niskanen Center Senior Fellow and Advisory Board member.