Imagine you’re a midlevel staffer in a federal department—any federal department. You come into work one morning in your drab Washington office and learn that President Donald Trump has signed an executive order that directly affects your job. Reading the order, you realize that to fulfill it, you’d need to act in a way you’re not comfortable with. In fact, the thing Trump’s asking you to do might be illegal. What now?

Perhaps your first worried thought is of Sally Yates. When Yates announced Monday that (for “as long as I am the Acting Attorney General”) she would not defend President Trump’s ban on travel from seven Muslim-majority countries, she was fired, of course. Yates wasn’t simply refusing to execute a policy she found unwise. She was refusing to execute one that is probably illegal, just as she assured none other than Sen. Jeff Sessions she’d do during her 2015 confirmation hearings.

But Yates’ fate won’t necessarily be yours. Although the president can fire Cabinet officials, such as the attorney general, for almost any reason, most government employees aren’t so easy to get rid of. Civil servants—that is, the rank-and-file members who make up the vast majority of the federal government—also take an oath to uphold the Constitution, some version of which has been used since the first Congress. Moreover, federal law (5 U.S.C. §2302(b)(9)(D), if you’re curious) makes it illegal to remove a civil servant “for refusing to obey an order that would require the individual to violate a law.” This provision was enacted as part of the Whistleblower Protection Act, in order to protect (as the law’s legislative history put it) “the right of American citizens to a law-abiding government.” And it’s no answer for the Trump administration to insist that its executive order is the law. In a decision last year, a federal court of appeals concluded that “law,” in Section 2302, doesn’t include an executive branch regulation or order. Rather, “law” means a valid statute (and, given that it’s the “supreme law of the land,” the Constitution as well).

So what is a career civil servant who’s being asked to execute an illegal order supposed to do? The combination of the servant’s oath of office (which promises to uphold the Constitution) and the civil-service law (which forbids disciplining employees who won’t break the law) makes the answer clear: just say no. Government employees are obligated to resist if they’re, say, ordered to build a Muslim registry, loot a foreign country’s natural resources, or murder the family members of suspected terrorists. (In fact, no less an authority than Michael Hayden argued, months ago, that members of the military would be required to defy President Trump’s orders in the event of the last example.)

But say you do refuse to go along with a likely illegal order. What happens then? After all, your superiors—who, if you go high enough up the chain, will eventually be political appointees, subject to direct presidential control—presumably won’t agree that President Trump’s orders violate the law. If you’re fired or suspended for refusing to execute an unlawful order, the Merit Systems Protection Board steps in. The MSPB exists to protect and enforce the civil-service requirements, including the protection against being required to execute illegal or unconstitutional orders. To do that, it’s empowered to hear appeals regarding civil servants’ terminations, reductions in pay, or suspensions. The board can conduct hearings, receive evidence, and ultimately decide whether an employee can lawfully be disciplined.

Of course, the MSPB is itself an executive agency, and therefore subject to Presidential control. The three-member board is currently down to just one person—an Obama appointee named Mark Robbins. President Trump has informed Robbins that he will serve as vice chairman—presumably under a new chair nominated by Trump. It’s conceivable, in other words, that the president could stack the MSPB with appointees who regarded his orders as perfectly legal and who would therefore not be inclined to shield the civil servants who were refusing to carry them out.

Even then, however, our system has an answer. Decisions of the MSPB are themselves reviewable in federal court—specifically, in the United States Court of Appeals for the Federal Circuit and (ultimately) the Supreme Court. Those federal courts would decide for themselves whether the Trump administration’s behavior was (in administrative-law parlance) “arbitrary, capricious, an abuse of discretion, or otherwise not in accordance with law.” In other words, the legal conscience of a career civil servant might well provide the eventual vehicle for the Supreme Court to consider the legality of the Trump administration’s most controversial policies.

Of course, asserting your legal rights and standing up to the government you work for aren’t always easy and come with substantial risks. (For one thing, a court might end up agreeing with the Trump administration that its orders were perfectly lawful.) The wise civil servant who was ready to refuse a Trump executive order would do well to talk with a lawyer beforehand. That’s why I’ve offered to represent, pro bono, any government official who refuses to execute a Trump order on the grounds that the order is illegal. A huge number of other lawyers—in particular, professors Daniel Epps (of Washington University in St. Louis) and Leah Litman (of the University of California–Irvine)—have offered their services as well, as have countless other lawyers, paralegals, law students, legal secretaries, and even (my favorite) a bartender in Cleveland.

No government program or White House command is self-executing. It takes thousands and thousands of people, distributed throughout the country, to transform an illegal order into an injustice. These loyal civil servants were there before President Trump arrived and they will mostly be there when he’s gone. Are you one of them? If so: The American system provides you with a choice. You can insist that you were just following orders. Or you can follow the law.