On his eighth day as president of the United States, Donald Trump invited FBI Director James Comey to have dinner at the White House. After some small talk about the size of the crowd at his inauguration (huge, he insisted), Trump demanded a personal pledge of loyalty. As Comey later testified, “the dinner was, at least in part, an effort to have me ask for my job and create some sort of patronage relationship.”

In keeping with his constitutional duties, Comey demurred. Less than four months later, the president fired him.

Trump’s demand of loyalty, and Comey’s refusal to grant it, calls attention to a delicate balancing act on which the survival of democracy has always depended. Elected leaders need to be able to impose the will of their constituents on the military and the civil service. If generals refuse to obey civilian commands that run counter to their interests, or if unelected public employees refuse to carry out policies with which they happen to disagree, elections become meaningless. The people may be free to vote for their preferred candidate every few years but are unable to make their preferences count.

But it is just as dangerous for soldiers and civil servants to obey their elected masters blindly. If a president can command the military and the civil service to break the law, there’s nothing to stop him from arresting his critics or falsifying an election. Even a president who has been democratically elected would then be in danger of overriding the will of the people once he falls out of favor.

This is precisely why the Founding Fathers insisted that the primary duty of American citizens should be to a set of ideas and institutions, not to a particular person. And so any immigrant who wishes to become a U.S. citizen, any soldier who wishes to enlist in the military and any civil servant or political appointee who wishes to take up office must, to this day, swear to “support and defend the Constitution of the United States against all enemies, foreign and domestic.” It is this fundamental tradition that Trump—acting more like an Old World monarch who is used to demanding fealty from his subjects—was attacking when he asked Comey to pledge his personal loyalty.

As Ian Bassin, a former White House lawyer and the founding director of Protect Democracy, told me, “The understanding in our society is that certain institutions are expected to be independent of any administration’s partisan or personal preferences. And we’re at a moment right now where this independence is being challenged—not just in individual cases like the Comey firing, but as a concept. So maintaining that we in America believe in the importance of that independence is one of the key challenges we face right now.”

To that end, Bassin’s group, a nonprofit that has been playing an increasingly important role in the fight to defend basic democratic norms over the past year, has recently launched a project that is as simple as it is powerful: #UpholdTheOath invites more than 2 million public servants in the United States to take and share a simple video of themselves reciting their oath of office—thereby reaffirming that, as intended by the Founding Fathers, their overriding loyalty is to the Constitution and not to any one political leader.

Over the past months, reporting on low morale at federal agencies including the State Department and the Department of Housing and Urban Development have shown just how desolate the situation has become since the start of the year. So part of the project’s purpose is simply to build community and boost morale. At a time when the general public rarely acknowledges the importance of their work and the president regularly denigrates their integrity, many public servants are cherishing the opportunity to express pride in their work. As Steve Lenkart, CEO of Government Executives International, one of more than a half-dozen nonprofits and federal-employee unions and associations supporting the project, told me, “This is a great, spontaneous way for federal employees to celebrate what they’re doing to serve their country.”

And yet, it is clear that the project will be perceived as a little more pointed than that. One of its early backers, for example, is Khizr Khan, the lawyer who spoke so movingly about his son and his own commitment to the Constitution at last year’s Democratic National Convention. “Twice in my life, I have lived under martial law,” Khan, an immigrant from Pakistan, told me. “Now, it’s clear that the rule of law is under attack here in the United States. Anybody who benefits from constitutional values must stand up and do their part.”

Public servants, as Khan sees it, are an important and frequently neglected actor in that fight, “Bureaucrats are an essential part of a functioning democracy. … This oath can be a reminder to themselves, and to others, that they stand in defense of the constitutional values they have sworn to serve.”

Khan sees the danger to the American republic as acute. And yet he ultimately believes that the American people will be able to fend off the current attack on the rule of law: “A majority of Americans are in favor of democracy, rule of law, and basic fairness. This is what the public servants taking this oath are recommitting themselves to.”

It is unfortunate that, as Khan’s comments make clear, any attempt to stand up for the neutrality of state institutions will by highly contentious at a time when the president is regularly attacking civil servants as disloyal or traitorous. But that makes it all the more important for defenders of the Constitution to insist that a contentious act need not be a partisan one.

A partisan act would be for civil servants, in their official capacity, to oppose policies of the Trump administration of which they happen to disapprove. Even liberals should be horrified by such behavior: For once civil servants feel emboldened to act on their partisan preferences, no elected politician would be able to enact his or her political program. One need only recall the case of Kim Davis, the county clerk in Kentucky who refused to issue licenses for same-sex marriages in 2015, to realize that democracy could be seriously impaired if civil servants were empowered to override decisions taken by courts and parliaments.

By contrast, civil servants who recommit themselves to basic democratic principles in the face of concerted attacks on their independence are taking a bold public stance in the best sense. Even conservatives should applaud the courage to do so: For once civil servants become willing to do the president’s bidding even when his commands violate the Constitution, any elected politician would gain the power to turn himself into a tyrant. This, too, would seriously endanger democracy.

This is why Bassin, the organizer of this initiative, is right to insist that the initiative can make an important contribution without violating the neutrality to which public servants rightly commit themselves. Faced with a president who is prone to demanding personal loyalty from them, Bassin explains, “It’s all the more important for civil servants to show that their ultimate loyalty is to the Constitution. When they are put in a difficult position, it helps to know that there are thousands of colleagues standing shoulder to shoulder with them. Celebrating people for reaffirming this oath is not a partisan act—it’s a patriotic act.”