On an autumn day in 1769, a Hungarian nobleman, Wolfgang von Kempelen, was summoned to witness a conjuring show at the imperial court of Maria Theresa, Empress of Austria-Hungary. So unimpressed was Kempelen by the performance that he impetuously declared he could do better himself. It was a boast that would change the course of his life. Six months later his extraordinary mechanical man made his debut. The Turk, as the automaton became known, was fashioned from wood, powered by clockwork and dressed in a stylish Turkish costume. But, most astonishing of all, it was capable of playing chess. Kempelen's contraption was a huge success in Europe and America. The subject of numerous stories, legends and outright fabrications, The Turk became associated with a host of historical figures, including Benjamin Franklin, Catherine the Great, Napoleon Bonaparte, Charles Babbage and Edgar Allen Poe. Along the way, this strange creation unwittingly helped to bring about the development of the power loom, the computer and the detective story. But how did it work? The Turk's invention coincided with the start of the industrial revolution - a time when the relationship between people and machines was being radically redefined. The mechanical chess-player baffled spectators and provoked frenzied speculation. Could a machine really think? Impossible, said some, but others were not so sure. Part historical detective story, part real-life fairy tale, the mystery of the Turk has assumed a new significance in the computer age, as scientists and philosophers continue to debate the possibility of machine intelligence. To modern eyes, the Turk now seems to have been a surprisingly far-sighted invention. This book tells the story of its remarkable and chequered career.