Since the government shutdown began, President Donald Trump has suggested multiple times that the furloughed and unpaid workers are mostly just Democrats. “Do the Dems realize that most of the people not getting paid are Democrats?” he tweeted on Dec. 27, just days after the shutdown began. Trump repeated the claim a little more than a week later, tweeting that he didn’t “care that most of the workers not getting paid are Democrats” and wanted to reopen the government anyway. The not-so-subtle hint here is that Democratic Party–supporting federal employees are the main ones harmed by the shutdown, so he doesn’t have that much reason to care if they’re furloughed or working without pay, or at least he doesn’t have as much reason to care as Democrats.

He suggests that congressional Democrats should give into his wall demand because their constituents are being disproportionately harmed. If this is Trump’s strategy, then he has a bigger problem than its ineffectiveness. Taking Democratic federal workers hostage because they are Democrats would violate their constitutional rights and their rights under the civil service laws.

First, some background. A recent analysis by the Washington Post suggests that in the 2018 election, federal employees did make significantly more donations to Democratic candidates than Republicans: Between 60 and 80 percent of donations went to Democrats. This may reflect a relatively small number of highly motivated Democrats making a large number of individual contributions, thanks to online donation systems like ActBlue, but it does suggest a Democratic lean in federal workers’ political activity. On the other hand, a 2010 Gallup survey (the most recent available) shows the two parties to be close in membership of the federal government: About 27 percent of federal workers in unions are Republican, and 39.5 percent are Democrats. But 32.5 percent of nonunion federal workers are Republican, and about 29 percent are Democrats. (Union membership accounts for only about one quarter of the federal workforce). So Trump is almost certainly correct that his shutdown disproportionately affects Democrats, though perhaps less than he might believe. (Congressional representation of federal workers, for example, is evenly split between the parties.)

Public employee legal protections now extend to any form of “discrimination” based on political affiliation.

The bigger issue here is the law. Since the Pendleton Act of 1883, America’s federal workers have been protected from the political patronage systems familiar under President Andrew Jackson and in urban political machines, where political victors would dole out the jobs of the loser’s party members to their own supporters. Meanwhile, the landmark Supreme Court case of Elrod v. Burns (1976), which challenged the Chicago political machines, established that patronage practices infringe on the First Amendment rights of all public employees to engage in speech and private political activity without fear of reprisal. As the court recognized, allowing politics to determine who works for the public (outside top-level policy positions) harms both employees and the public.

Public employee legal protections now extend beyond hiring and firing, to any form of “discrimination” based on political affiliation. Under the Civil Service Reform Act of 1978, “all employees and applicants for employment should receive fair and equitable treatment in all aspects of personnel management without regard to political affiliation … and with proper regard for their privacy and constitutional rights.” When the president, the chief executive of federal agencies, denies employees pay and forces them to work because of their party, he is engaging in unfair and inequitable personnel management. Note that a harmful act for the purposes of the law can constitute discrimination against members of a group even if it also affects some nonmembers, and it need not be motivated by a direct purpose of harming that group. Intentionally harming members of a protected group with the motive to extract concessions from someone else is also illegal discrimination.

There will be some lawyers’ quibbles—for instance, that the president has not actually “acted” so as to directly cause harm to the employees (he has, instead, told Senate Majority Leader Mitch McConnell that he will not sign any budget unless his wall is funded) or that since the employees are likely to get back pay, they have not been harmed by a management action. But these are flimsy defenses: Trump expressly declared that he personally would “own” the shutdown as his choice of negotiating strategy. And the incremental decisions to recall more and more personnel to work without pay, evidently to minimize damage to the president’s base, certainly constitute employment actions. The more important barrier comes from the Supreme Court’s decision in Trump v. Hawaii (2018), the “Muslim ban” case, where the court ignored a number of tweets and statements by Trump indicating an anti-Muslim bias. The court said, instead, it would accept the justifications for the immigration restrictions set out later by the Department of Homeland Security. With the Trump shutdown, however, there so far has been no careful elaboration of a legal justification. We have only the president’s tweets and statements. A lawsuit challenging the shutdown on discrimination grounds may be able to find further evidence showing that workers’ party identity was a central reason Trump chose this strategy.

So far, other constitutional attacks on the shutdown, based in the 13th Amendment’s protection against forced labor, have failed. Enterprising state attorneys general and employee lawyers should try the First Amendment and the Civil Service Reform Act instead. The integrity of our civil service depends on it.