In September 2006, the World Chess Championship devolved into a debate about bathrooms. One champion, Veselin Topalov, accused the other, Vladimir Kramnik, of excessive urination, hinting that Kramnik was retreating to the unmonitored bathroom to receive smuggled computer assistance. (Kramnik responded that he merely drank a lot of water.) Kramnik was eventually declared the victor, but to many, the episode displayed the sad state that the grand game had fallen into since Garry Kasparov lost to IBM’s Deep Blue in 1997. Back then, Kasparov was bitter about the loss and accused IBM of cheating—with human intervention, saying that he saw uncanny human intelligence in the computer’s moves.

Even that incident, though, was not the first time the line between man and machine had been blurred in the game. The first machine to awe humanity with its chess mastery was the eighteenth-century life-size automaton known as the Turk. Constructed in 1770 by Wolfgang von Kempelen to impress Empress Maria Theresa, the Turk appeared as a wooden Oriental sorcerer seated at a large cabinet. Before playing commenced, Kempelen would open the cabinet doors to reveal the clockwork machinery that controlled the Turk. The audience could see that there was nothing else inside. After the doors were closed and a challenger seated, the Turk would come eerily to life. He would move the pieces robotically, but shake his head or tap his hand in human displays of annoyance or pride. He also nearly always won.

The Turk became a spectacular attraction, thrilling, baffling, and terrifying viewers across Europe and America for decades. His victims included Benjamin Franklin, Catherine the Great, and Napoleon. In one account of that match, Napoleon, in perhaps telling fashion, moved first—despite the fact that the Turk was playing white—and then attempted illegal move after illegal move until the Turk, fed up with these shenanigans, swiped the pieces off the board with a stiff wooden arm.

How did the Turk work? Many were convinced it was a hoax—a hidden dwarf? Magnetic control?—but no one could prove it. Members of the Académie des Sciences probed the Turk for his secrets but were left baffled. Some even thought it was controlled from beyond the grave. One woman, during an exhibition, was spotted letting out a “pious ejaculation” and hiding in the back corner “from the evil spirit, which she firmly believed possessed the machine.” Others were ready to accept that mankind had indeed been surpassed.

Many writers found inspiration in the Turk, including Ambrose Bierce, whose short story “Moxon’s Master” describes a chess-playing robot that murders its creator. Edgar Allan Poe in particular became obsessed with the machine. In 1836, he published a famous essay that attempted to prove that the Turk was a fraud. Poe was positive that a human mind was at work, in part because he reasoned that a “pure machine” would necessarily “always win.” Poe deduced that a small man was crawling up “into the body of the Turk just so high as to bring his eyes above the level of the chess-board.” (Poe would go on to write detective stories focused on exposing such mysteries and to conduct hoaxes of his own, most famously the Balloon-Hoax of 1844, in which he wrote a series of fictionalized newspaper articles about a three-day transatlantic balloon flight.)

As it turned out, Poe was right that the Turk was a hoax, although he was incorrect about the workings of the trick. Rather than a man hidden inside the wooden body, the seemingly exposed innards of the cabinet did not extend all the way back. A hidden grandmaster slid around when the cabinet doors were opened and closed. The concealed grandmaster controlled the Turk’s movements and followed the game’s action through a clever arrangement of magnets and strings.

Like any wildly popular film or book today, the Turk inspired plenty of imitators, among them Ajeeb (“The Egyptian”), who played Harry Houdini, O. Henry, and Teddy Roosevelt. Perhaps best known, besides the Turk, was the Digesting Duck of Jacques de Vaucanson, a machine that appeared to eat, digest, and defecate.

The Turk eventually reached a sad end. Johann Nepomuk Mälzel, then the owner, took the Turk to Cuba in the 1830s, where his hidden operator succumbed to yellow fever. Mälzel himself died on the ship back. The Turk was eventually acquired by Poe’s physician, Dr. John Kearsley Mitchell, but its appeal had begun to wane and the Turk was finally left, dusty and forgotten, in the Chinese Museum in Philadelphia, where it was destroyed in the fire of 1854.

The Turk’s many admirers seemed cursed to suffer an unfortunate fate as well. Poe died mysteriously in 1849, after being found in the streets, incoherent and wearing someone else’s clothes. Bierce, in one of American literature’s greatest mysteries, disappeared while traveling with Pancho Villa’s army in 1913. The Ajeeb machine burned in a fire in 1929.

It’s been more than two centuries since the Turk’s heyday, and now we live in our own uncanny times, where the line between automated and human intelligence is constantly blurred and blended. Spammers evade censors with generated Dada poetry, dead celebrities are resurrected by computer animation for advertisements, news articles are written by algorithms, and friends’ conversations are mediated through Apple’s Siri “intelligent personal assistant” program. We have become fully meshed with our machines.

Although the Turk lacked a mechanical mind, he is in one way the wooden grandfather of all our digital world. Charles Babbage, often known as the father of the computer, was defeated twice by the Turk. He knew it was a trick, but it also sparked the idea that machines could think intelligently. Soon after, he began work on the Difference Engine and later the Analytical Engine—devices that paved the way for modern computing.

Lincoln Michel is a writer and editor living in Brooklyn. You can find him online at lincolnmichel.com.