As the reality of President Donald J. Trump sets in, dismayed progressives will try to apportion blame between a Trump-enabling, substance-ignoring media, Republican vote suppressors in state legislatures and the federal courts, Hillary Clinton’s weaknesses as a candidate, irresponsible third-party runs, and various other factors.

But we shouldn’t lose sight of one simple fact: By the standards used to conduct elections in virtually every liberal democratic jurisdiction in the world, Hillary Clinton won. As I type, Clinton has a popular vote lead of about 150,000 votes, and when the ballots from West Coast states are counted, her lead is likely to expand substantially to a million or more. The American people, in other words, chose Hillary Clinton. She lost because the Constitution does not choose the president democratically.

It’s very likely that, had the Constitution been framed and ratified even a decade or two later, the president would have been chosen by direct popular vote. Not only does no other comparable democracy use any system like the Electoral College, no American state does (although the Constitution leaves them free to use the electoral system of their choice so long as it is consistent with “Republican” government). And Donald Trump is an all too logical product of the Electoral College’s deficiencies. As Yale Law School professor Akhil Amar put it in 2000, when Al Gore both won the popular vote and lost the election, the Electoral College “was designed at the founding of the country to help one group—white Southern males—and this year, it has apparently done just that.”

The Electoral College was essentially the product of two imperatives, neither of them very attractive. First, it reflected the belief of many framers that the “excess democracy” shown by state legislatures that had passed debt relief legislation needed to be curtailed. (It is not a coincidence that the Constitution of 1787, even after being amended by the Bill of Rights, did not protect the free speech or due process rights of citizens against state legislatures, but did prevent the states from passing any “Law impairing the Obligation of Contracts.”) The Electoral College was meant to act as a “filter” between the people and the White House. And while the idea that the electors should exercise independent judgment quickly became discredited, the Electoral College remained to potentially bequeath the White House to a candidate who is not the choice of the people.

The second major purpose accomplished by the Electoral College was to protect the interests of slaveholders. Slaves, of course, did not vote. But the Electoral College meant that slaves (who were counted as three-fifths of a person for the purposes of apportionment) would give the South extra clout in the Electoral College. And because Congress failed to adhere to its obligation under Section 2 of the Fourteenth Amendment to reduce the representation of states that disenfranchised voters, during the Jim Crow era the Electoral College allowed the South to be fully represented in the selection of the president even as it denied the right to vote to a large segment of its population.

The Electoral College, in other words, is anti-democratic twice over. As Harvard Law School’s Michael Klarman, author of the superb new book The Framer’s Coup, puts it, the framers “rejected direct election of the president mostly because they distrusted the people and because Southern slaves would not count in a direct vote.” The result was that “the malapportionment in the Electoral College, which never had a very good justification, continues to exert influence today.”

In facilitating the election of Trump, the Electoral College has effectively disenfranchised racial minorities once again. The Electoral College underrepresented Clinton’s diverse, urban-centered coalition, and overrepresented Trump’s coalition, which is based around rural and suburban white people. Trump’s white nationalist demagoguery was unable to secure a plurality, let alone a majority, in a racially diverse country—but he didn’t need one.

This is simply indefensible. The Electoral College does not serve any legitimate purpose that could justify its anti-democratic aspects. The frequent argument that it ensures that attention will be paid to small states is absurd. In reality, it means that campaigns will ignore both most small and smallish states (neither campaign, for example, seriously contested Wisconsin) and large states where the outcome is not in doubt, like New York, California, and Texas. There is no democratic value to largely confining presidential campaigns to a relatively small number of large states where the outcome is perennially in some doubt. And white rural states, which are already massively overrepresented in the Senate, hardly need further overrepresentation when choosing the president.

Unfortunately, while the Electoral College is horrible, we’re going to be stuck with it for a long time. It has now handed the White House to what should have been a losing Republican candidate twice in less than two decades. Republicans, therefore, will certainly be able to thwart the supermajorities required to pass a constitutional amendment, and will also almost certainly be able to stop a National Popular Vote workaround.

Indeed, what’s depressing is that the egregiously anti-democratic aspects of the Electoral College will have self-reinforcing anti-democratic effects. The last misfire of the Electoral College in 2000 ultimately gave us John Roberts and Samuel Alito as Supreme Court justices, and they provided the pivotal votes for the gutting of the Voting Rights Act. A solidly Republican Supreme Court will continue to act as a matador for voter suppression efforts by Republican state legislatures, which will disenfranchise more minority voters.

Donald Trump’s election is a tragedy on a world-historic scale. And it happened because the United States uses an indefensible, anti-democratic anachronism to elect the most powerful figure in its federal government.