As James Madison made clear at the Constitutional Convention in 1787 in Philadelphia, the big political divide in America was not between big and small states; it was between North and South and was all about slavery. So, too, was the Electoral College at the founding, both in its original incarnation in 1787 and in the version later created by the 12th Amendment, which was adopted in 1804.

Behind closed doors at the Constitutional Convention, when the idea of direct presidential election was proposed by the Northerner James Wilson, the Southerner James Madison explained why this was a political nonstarter: Slaves couldn’t vote, so the slaveholding South would basically lose every time in a national direct vote. But if slaves could somehow be counted in an indirect system, maybe at a discount (say, three-fifths), well, that might sell in the South. Thus were planted the early seeds of an Electoral College system.

Some have argued that direct election was doomed because the Philadelphia delegates disdained democracy. Behind closed doors these elites did indeed bad-mouth the masses (as do elites today). But look at what the framers of the Constitution did, rather than what they said. They put the Constitution itself to a far more democratic vote than had been seen before. They provided for a directly elected House of Representatives (which the earlier Articles of Confederation did not do). They omitted all property qualifications for leading federal positions, unlike almost every state constitution then on the books.

So why didn’t they go even further, providing direct presidential election? Because of Madison’s political calculation: Direct election would have been a dealbreaker for the South. For a while, having members of Congress elect the president emerged as a possible alternative, but this idea, too, would have been pro-slavery for the same reason: Thanks to the three-fifths clause, slave states got extra votes in the House, just as in the Electoral College system that was finally adopted.

When George Washington left the political stage in the mid-1790s, America witnessed its first two contested presidential elections. Twice, most Southerners backed a Southerner (Thomas Jefferson) and most Northerners backed a Northerner (John Adams). Without the extra electoral votes generated by its enormous slave population, the South would have lost the election of 1800, which Jefferson won.