To understand the terrorists of today, we can look at their forgotten forebears from the 19th century:

I discovered the secret through reading about 19th-century history, particularly the years from the 1848 revolutions to the outbreak of the First World War in 1914. The key was Bismarck, the Prussian minister-president who unified Germany. If you want to learn about Bismarck, you will probably pick up a book by some historian of international relations, such as A.J.P. Taylor. That’s the right place to start. But it means you can read a lot about Bismarck before finding out about the time in May 1866 when a guy shot him.

Ferdinand Cohen-Blind, a Badenese student of pan-German sentiments, waylaid Bismarck with a pistol on the Unter den Linden. He fired five rounds. None missed. Three merely grazed his midsection, and two ricocheted off his ribs. He went home and ate a big lunch before letting himself be examined by a doctor.

But even the books that condescend to mention this triviality may not tell you about the other time a guy shot Bismarck: A young Catholic tried to kill him in July 1874, during the anti-Catholic Kulturkampf Bismarck had engineered, but only managed to score his right hand with a bullet.

The point is not that Bismarck was particularly hated, although he was. The point is that this period of European (and American) history was crawling with young, often solitary male terrorists, most of whom showed signs of mental disorder when caught and tried, and most of whom were attached to some prevailing utopian cause. They tended to be anarchists, nationalists or socialists, but the distinctions are not always clear, and were not thought particularly important. The 19th-century mind identified these young men as congenital conspirators. It emphasized what they had in common: social maladjustment, mania, an overwhelming sense of mission and, usually, a prior record of minor crimes.

It has become a pastime of mine to pick major royal or ministerial figures from 19th-century continental Europe and look up the little-known assassination attempts against them. Even in peaceful, isolated England, there were no fewer than seven attempts to shoot Queen Victoria. Russian czars, French presidents and Bulgarian prime ministers make particularly fertile ground.

Just try, for example, either Napoleon. A bomb designed to kill the first on his way to the opera injured or killed roughly 30 people around Christmas 1800; the conspirators were pro-Bourbon legitimists. Exactly the same thing happened to the third in 1858: A bomb planted by Italian revolutionaries killed eight and injured 142, while barely stopping the emperor’s carriage.

Biographies will often omit these events totally, much less note the astonishing Napoleonic parallel. Yet all this bombing and gunfire must have had a profound psychological effect on the leaders who were targeted, along with peers elsewhere. The prevalence of assassination obviously influenced the gory histories of the emerging Balkan states and, once you unlock the secret, you can see the imprint of terror on the history of Germany, with its countless princelings and kinglets — all of them frightened all the time, and thus predisposed to political overreaction.

No one sees the murders of three U.S. presidents between 1865 and 1900 as part of the same phenomenon, but it was. And the bad news is that the First World War, which began with a famous assassination, was in some ways a culmination of this tendency to desperate, violent action.