There are two ways to look at the effect of Donald Trump’s presidency on American democracy. One is that he is a menace to the republic: that his attacks on journalists, federal judges, and constitutional norms undermine the rule of law. The other is that he is the greatest thing to happen to America’s civic and political ecosystem in decades.

These views are not mutually exclusive. In fact, they are causally related. The president’s attacks on established institutions have triggered a systemic immune response in the body politic, producing a surge in engagement among his opponents (and also his fans).

Since the early 1970s, the nation’s civic health—from membership in civic groups to attendance at public meetings to newspaper reading—has been in steady, severe decline. Economic inequality has fed political inequality in a viciously self-reinforcing loop of disenfranchisement and concentration of clout.

But now millions of people, once cynical bystanders, are participating earnestly. In mass marches and packed congressional town meetings, Americans have taken vocal stands for inclusion. At airports and campuses and street corners they have swarmed in defense of Muslim and undocumented neighbors. Membership in the ACLU and the League of Women Voters has swelled, as have subscriptions to leading newspapers.

The ranks of Trump’s supporters, meanwhile, are filled with first-time or first-time-in-a-long-time participants in politics. He has given voice to communities long disregarded by cosmopolitan political elites. Heartened by his election and his willingness in office to buck convention, they are now rallying to his defense.

Trump has also generated a boom in popular civic education. Across the country, people are creating political clubs, discussion circles, teach-ins. My organization, Citizen University, has launched regular gatherings called Civic Saturdays—a civic analogue to church—that have drawn overflow crowds. Indivisible, an insiders’ guide to pressuring Congress, has sparked intense local organizing and activism. Google searches for the Emoluments Clause, recusal rules, and judicial review have spiked. And iCivics.org, the civics video gaming platform created by former U.S. Supreme Court Justice Sandra Day O’Connor, has seen a doubling of game-playing this year.

This civic surge, it’s important to note, crosses ideological lines. Many principled libertarians and conservatives, troubled by Trump’s recklessness, are now cheered by rising popular interest in the ideals of liberty and limits on government power.

The conservative Federalist Society is fielding new inquiries from left and right about its Article I Project, which aims to restore congressional primacy against an overreaching executive. Civic start-ups like Free the People are sparking interest among Millennials in a hip libertarianism. The right-leaning American Enterprise Institute held a symposium recently positing that Trump’s arrival is a “Sputnik moment” for civic education.

All this energy, now visible and palpable, had been gathering long before Trump became president and has extended well beyond the borders of the United States. From the Arab Spring to the Brexit, from the Tea Party to $15 Now and Black Lives Matter, we live in an age of bottom-up power: citizens self-organizing to challenge entrenched monopolies and orthodoxies. Trump’s election itself was evidence of this.

The surge will likely outlast his presidency. Americans today are rushing to make up for decades of atrophy and neglect in civic education and engagement. But as they do so it’s important to remember that citizenship is about more than know-how. It’s also about “know-why”—the moral purposes of self-government.

Citizenship in a republic requires not just literacy in power but also a grounding in character. Power literacy means understanding systems of law, custom, and institutions—and acting with skill to move those systems. Civic character is more than personal virtue. It is about character in the collective—mutuality, reciprocity, respect, service, justice—and the prosocial ethics of being a member of the body.

Perhaps the most heartening part of today’s civic renewal is that people are exercising both power and character. They are practicing strategies of action while reckoning with questions of first principle. On campuses and public squares, they are debating the rights and responsibilities of dissent. On social media and in person, they are asking just what makes a leader legitimate and a representative truly representative.

Every time Trump acts or speaks against disfavored minority groups, they also are reminded that democracy alone—that is, a process of majority rule—is not enough. As Abraham Lincoln argued during his 1858 debates against Stephen Douglas about slavery, a democratic process is legitimate only when coupled with a moral sense. America today is beginning to rediscover its moral sense.

The president and his advisers will keep challenging moral and civic norms. Yet that is precisely why over the long term I am optimistic. As Americans have shown each other the last two months, the deepest source of this nation’s greatness and resilience is the decentralized way that citizens will reclaim their power. There are more civic antibodies here than viruses. We should thank Donald Trump for giving us the chance to prove it.