All creation is mine, and every man, a miner.”

So begins one of the least-known speeches by Abraham Lincoln, the “Lecture on Discoveries and Inventions,” versions of which were delivered on at least six occasions between April 1858 and April 1860. We generally think of Lincoln as an American prophet, a redeemer president who freed the slaves, saved the Union, and ennobled the cause of liberty with magnificent oratory. We only rarely think of him as a philosopher-statesman, a man who had enduringly relevant things to say about the hidden vulnerabilities of democratic institutions in the face of change: generational, ideological, and, not least, technological.

He was. And much of his thinking on the subject was deeply rooted — as it would have been for most Americans in the 19th century — in the Hebrew Bible.

Not that Lincoln saw himself as some sort of scholar. “I am not a professional lecturer,” Lincoln confessed. “Have never got up but one lecture; and that I think, a rather poor one.” What we have today of the lecture exists only in fragmentary form, lacks a proper conclusion, is redundant in places, and was probably delivered with a fair amount of extemporizing — probably the result of a writing process described by his law partner William Herndon as “noting down ideas on stray pieces of paper, which found lodgment inside his hat.”

Still, for all his engagement with pressing political and legal issues, Lincoln was repeatedly forced to reckon with questions that went beyond the merely contemporary. Was the United States founded in 1776 as a single nation with a unifying set of moral convictions, or in 1787, as a compact of states with distinct legal rights? Was the Declaration of Independence’s claim that “all men are created equal” a self-evident truth or, as John C. Calhoun put it, a “self-evident lie”? Could a republic founded by one revolutionary generation resist the revolutionary impulse of succeeding generations to overthrow it?

Lincoln also had a lifelong fascination with science and technology. In 1849 he received a patent for a mechanism to lift boats over shoals, making him the only president in history to ever get one. A legal acquaintance from the 1850s, Charles Zane, was with Lincoln the first time the future president saw a self-raking reaping machine. “He examined it with much interest,” Zane recalled, “and then I listened to him explaining, in the fewest words but with great clearness, how power and motion were communicated to the different appliances, especially to the sickle, the revolving rake, and the reel.”

But it was as president that Lincoln had the best opportunity, and the greatest need, to explore his technological fixations fully. He corresponded with Richard Gatling, inventor of the eponymous gun, and pushed the army to adopt it. He urged the creation of the Union Army Balloon Corps and appointed Thaddeus S. C. Lowe to its command: In June 1861, Lowe telegraphed the president, from a height of 500 feet, a message “acknowledging indebtedness to your encouragement for the opportunity of demonstrating the availability of the science of aeronautics in the service of the country.” A lawn south of the White House became an informal testing ground for new weapons, many of which Lincoln liked to try out or see for himself. “The inventors were more a source of amusement than of annoyance,” recalled John Hay, Lincoln’s personal secretary. “They were usually men of some originality of character, not infrequently carried to eccentricity. Lincoln had a quick comprehension of mechanical principles, and often detected a flaw in an invention which the contriver had overlooked.”

In all this, Lincoln was typically American: practical, curious, and enthusiastic about the capacity of science and technology to improve everyday life, ease suffering, and advance the common interests of mankind. But he also had doubts: Could invention itself, for all its potential benefits, sometimes pose a potentially fatal danger to the cause of human freedom?

Here is where the enduring interest of his “Lecture on Discoveries and Inventions” lies. Americans tend to think that political freedom and technological innovation are not merely complementary but also mutually reinforcing; that is, that liberalism supplies the political and economic conditions in which inventive people are most likely to flourish, and that the products of invention strengthen the foundations of liberalism by making society richer and happier. This is the blasé confidence that leads us to believe that the benefits of technological progress invariably outweigh its costs, whatever turbulence it occasionally produces.

But what if that isn’t always true — if, that is, Lincoln’s doubts are well founded? What if certain technologies transform not merely the way we produce goods and services but also how we treat other human beings, relate to our government, understand our shared rights? Can a nation that sees itself as the greatest invention of all time — Novus ordo seclorum, “a new order of the ages” — preserve any sense of reverence for the ideas and ideals that came before it? Can a restlessly inventive people restrain their taste for the new, and thus their eagerness to discard the old, even if the new threatens the foundations of their own liberty?

Lincoln begins his talk by observing that invention is a defining feature of human nature: “Man is not the only animal who labors; but he is the only one who improves his workmanship.” What follows is a catalogue, based on biblical references, of ancient inventions and inventors. Tubal-cain, seventh in descent from Adam, was, in the words of Genesis, “an instructor of every artificer in brass and iron.” Thread — suggesting spinning and weaving — is also mentioned in Genesis, as is the saddle. (“Abraham rose up early in the morning, and saddled his ass.”) There is a mention of a chariot “upon the occasion of Joseph being made Governor by Pharaoh,” implying the prior invention of the wheel and axle.

Lincoln cites at least 24 specific passages from the Books of Moses. Other than demonstrating his deep familiarity with the Bible, there’s a hidden purpose to these references. “I think I can show, at least in a fanciful way, that all the modern inventions were known centuries ago,” he explained to Louis Agassiz in January 1865, when the great natural scientist came to the White House and asked about the lecture. Not everything that is new is necessarily better: The ancients, Lincoln is saying, weren’t our inferiors when it came to doing the sorts of things we value most about ourselves. In important ways, they might have been much better.

The full meaning of Lincoln’s remark to Agassiz becomes clearer in the second half of the speech, which begins with such a startling turn that, until the 1990s, historians thought it constituted a completely different lecture. “We have all heard of Young America,” Lincoln says. “He is the most current youth of the age. Some think him conceited, and arrogant; but has he not reason to entertain a rather extensive opinion of himself? Is he not the inventor and owner of the present, and sole hope of the future?”

Young America was the name of a cultural, artistic, and political movement, formed in the 1830s and connected to the Democratic Party, which believed that America had to make a decisive break with everything deemed old. “All history is to be re-written; political science and the whole scope of all moral truth have to be considered and illustrated in the light of the democratic principle,” wrote the magazine columnist John Louis O’Sullivan, a champion of the movement. “All old subjects of thought and all new questions arising, connected more or less directly with human existence, have to be take up again and re-examined.”

The animating political spirit of Young America was a kind of self-confident jingoism that found expression in the policies that led to the Mexican–American War — which Lincoln had opposed on the grounds that it was both unjust and dangerous, since it opened up new lands for the expansion of slavery. Young America also believed in unfettered capitalism, including free trade, which Lincoln opposed in favor of a tariff system, and a kind of self-serving morality that disguised its greed in professions of faith in humanity. Its greatest political champion was Stephen Douglas, who defeated Lincoln in the 1858 Illinois Senate race and later lost to him in the 1860 presidential election.

“In knowledge he is particularly rich,” Lincoln says of Young America with obvious sarcasm. “He knows all that can possibly be known; inclines to believe in spiritual rappings and is the unquestioned inventor of ‘Manifest Destiny,’” the phrase for which O’Sullivan is most famous. “His horror is for all that is old, particularly ‘Old Fogy’; and if there be any thing old which he can endure, it is only old whiskey and old tobacco.”

Now Lincoln has a bit of fun. If Young America despises Old Fogy, then how does he feel about “the first of all fogies, father Adam”? Adam, Lincoln says, was probably “ignorant, and simple in his habits.” Yet he had certain advantages over his successors. He was “a very perfect physical man.” He had “dominion over all the earth.” He is the inventor of clothing, speech, and “the art of invention” itself. And even then, there is a prior inventor — that is, Adam’s own creator. Lincoln pauses to marvel at “the great activity of the tongue, in articulating sounds,” and then “the wonderful powers of the eye, in conveying ideas to the mind from writing.” No modern machine, Lincoln implies, could possibly match these.

In other words, the greatest inventor is God, a point that would not have been lost on Lincoln’s pious audiences (whom he was tacitly courting as voters). This does not mean that human beings should not invent — otherwise, God would not have endowed human beings with inventive natures. But it does suggest that invention involves a form of gratitude to the Divine, and perhaps a conviction that the way He invented us is how we should invent in turn: lovingly, humanely, ethically.

For Lincoln, the ethical invention par excellence is the printing press, because it helped liberate human potential as nothing else before it or since. “It is very probable — almost certain — that the great mass of men, at that time” (before the invention of the press), “were utterly unconscious, that their conditions, or their minds were capable of improvement,” Lincoln says.

They not only looked upon the educated few as superior beings; but they supposed themselves to be naturally incapable of rising to equality. To immancipate the mind from this false and under estimate of itself, is the great task which printing came into the world to perform. It is difficult for us, now and here, to conceive how strong this slavery of the mind was; and how long it did, of necessity, take, to break its shackles, and to get a habit of freedom of thought, established.

If the printing press is the paradigmatic good invention, what is the paradigmatic bad one? A single telling line gives away his thinking:

I have already intimated my opinion that in the world’s history, certain inventions and discoveries occurred, of peculiar value, on account of their great efficiency in facilitating all other inventions and discoveries. Of these were the arts of writing and of printing — the discovery of America, and the introduction of Patent-laws. The date of the first, as already stated, is unknown; but it certainly was as much as fifteen hundred years before the Christian era; the second — printing — came in 1436, or nearly three thousand years after the first. The others followed more rapidly — the discovery of America in 1492, and the first patent laws in 1624. Though not apposite to my present purpose, it is but justice to the fruitfulness of that period, to mention two other important events — the Lutheran Reformation in 1517, and, still earlier, the invention of negroes, or, of the present mode of using them, in 1434. [My emphasis.]

The date appears to be a reference to the origins of the African slave trade, initially by Portuguese slavers selling their captives to Spanish buyers. But the power of the line — the only reference to American slavery in the entire lecture — rests in its argument that the idea of “negro” as a category has nothing to do with nature and everything to do with invention; that is, that racialized slavery, if not the very idea of race, is a contrivance of relatively modern times. Invention, after all, is not just about the making of devices but also the minting of ideas and the creation of institutions — in this case, the idea of racial inferiority, and the institution of slavery to profit from it.

It would have been difficult for Lincoln to convince his listeners that nothing fundamental distinguished them from their black servants or slaves. That’s probably why he touches on it only glancingly (“not apposite to my present purpose”). But the radicalism of what he is saying should not be missed: He is arguing that concepts of race and racial superiority are, to use the argot of 21st-century academia, “social constructs.” What appeared so completely natural to a white, 19th-century American audience was, Lincoln believed, an invention of the mind — and one that, within a few years of Lincoln’s speech, would have to be violently undone.

What Lincoln called “the present mode” of using black people wasn’t just a function of ideas about race. Technology was pivotal, too. One of the surprising omissions in the “Lecture on Discoveries and Inventions” (though quite possibly because we don’t have the full text) is any reference to Eli Whitney’s cotton gin, invented in 1793, which transformed the economic incentives of the American South by making cotton plantations immensely profitable.

Even so, we know the cotton gin was very much on Lincoln’s mind. In July 1858, shortly after he first delivered his “Lecture on Discoveries and Inventions,” he gave a speech in Springfield explaining how his views about slavery had evolved over time. As a younger man, Lincoln explained, he had opposed slavery while believing it was on a gradual course to extinction. But with the passage of the Kansas-Nebraska Act in 1854, he concluded that his hopes had “been resting in delusion.” One point of evidence was a speech given by South Carolina congressman Preston Brooks, remembered by history as the man who caned Senator Charles Sumner, the Massachusetts abolitionist, on the floor of the Senate. “Mr. Brooks,” Lincoln said,

said, what I think, that the framers of our Constitution placed the institution of slavery where the public mind rested in the hope that it was on the course of ultimate extinction. But he went on to say that the men of the present age, by their experience, have become wiser than the framers of the Constitution; and the invention of the cotton gin had made the perpetuity of slavery a necessity in this country.

Simply put, the cotton gin gave wealthy white Southerners motives far more powerful than their moral scruples to perpetuate the institution of slavery: power, wealth, ease. The convictions that uphold a free society, which Jefferson named so memorably in the Declaration of Independence, simply collapsed in the face of those temptations. Because of the cotton gin, every political impulse in the South sought to entrench slavery; every economic instinct to expand it; and every ideological tendency to justify it. The fact that the justifications were ludicrous — “although volume upon volume is written to prove slavery a very good thing,” Lincoln scoffed in yet another speech, “we never hear of the man who wishes to take the good of it, by being a slave himself” — did almost nothing to diminish their power. Technology and the perverse incentives it creates warp reason.

The cotton gin is a technology of the distant past. But it’s worth asking: What is our own cotton gin? What technology warps our relationship to other citizens, sows distrust in democratic institutions, atomizes the individual, polarizes politics, disseminates conspiracy theories, empowers bigots, and embitters personal relationships? And — in doing all this damage — reaps immense profits for its inventors, innovators, and investors?

There’s more than one answer, no doubt. But little compares to social media in its consequences for democratic norms. When Mark Zuckerberg took Facebook public in 2012, he told investors that his company would “rewire the way people spread and consume information” and “once again transform many of our core institutions and industries.” As the social psychologist Jonathan Haidt has pointed out, he was right — just not in the way he thought. The algorithms of social media “encouraged dishonesty and mob dynamics,” Haidt wrote a decade later in The Atlantic. They have “magnified and weaponized the frivolous” and are “almost perfectly designed to bring out our most moralistic and least reflective selves.”

“It was just this kind of twitchy and explosive spread of anger,” Haidt adds, “that James Madison had tried to protect us from as he was drafting the U.S. Constitution.”

This isn’t the place to speculate about how much additional damage social media will do to the fabric of a free society. The central point, which Lincoln saw so clearly, is that technology is not merely a tool to be shaped by its users for better or worse. It is itself a shaper that can turn people into tools, whether as slaves or, in the case of social media, “users.” The idea that technology should or can be separated from politics — a central conceit of liberal-democratic ideology — is wrong: Technology is among the most fundamental issues in all of politics. To think otherwise is to perpetuate an illusion, if not a deception, that leaves us at the mercy of technological “advances” that we choose naïvely and, once they take hold, can scarcely control.

Lincoln is not asking us to resist the technological trend by becoming a society of Luddites, which would only harm the interests of a free society and its people. Nor is he insisting that we predict all the potential dangers of powerful new technologies or kill them in their infancy. He is, however, suggesting that a task of democratic statesmanship is to ask whether a new technology is likelier to lead to the emancipation of the mind than to its enslavement. And, should we answer in the negative, he suggests, we can put limits on those technologies, whether it’s through regulation or education or the deliberate cultivation of a habit of reverence for the old amid our infatuation with the new.

The core of all of Lincoln’s teachings is that democracies fail when people become careless about what it means to be human. And the test of any technology is whether it makes us more human, not less.