And yet, by the end of the century, technology and economic globalization were making a younger generation nervous about how long their country could remain isolated and unarmed. “A rich nation which is slothful, timid or unwieldy is an easy prey for any people which still retains those most valuable of all qualities, the soldierly virtues,” Roosevelt said, in his typical hyperbole, at the Naval War College in 1897, during his brief term as assistant secretary of the Navy.

This sense of vulnerability in a changing world was not the only thing that had Americans rethinking their place in it. The country was growing — its population went from 31 million in 1860 to 76 million within four decades; its per capita economic output doubled in the last third of the 19th century. A robust, urbanizing public had the time and education to read newspapers, to think about the world’s problems and to come to believe, through an alchemy of Christian moralism and American can-do-ism, that it could fix them.

When they read about massacres of Armenians by the Ottoman Army, American editors and readers were apoplectic and demanded that Washington threaten military action. They called for war against imperialist Britain in a land dispute with Venezuela.

And they flocked to the cause of “Cuba Libre,” especially once fighting broke out on the island in 1895. The plight of the Cubans was particularly affecting: Over the next three years, hundreds of thousands of civilians died, many in Spanish concentration camps, the existence of which spurred hundreds of Americans to join illegal filibuster missions to aid the rebels.

Richard Harding Davis, a correspondent who traveled across Cuba in early 1897, came back convinced that it was up to the United States to stop the slaughter. It was not enough to chastise Spain for its excesses, he wrote. “Why should we not go a step farther and a step higher, and interfere in the name of humanity?” he asked. Millions of Americans agreed.

When McKinley declared war, in April 1898, he was moved above all by this humanitarian impulse. The mysterious destruction of the battleship Maine in Havana’s harbor that February didn’t help, but the primary driver was the widely held belief that Spain was destroying Cuba. “A country nearly as large as England, with all the material conditions of opulent civilization, has been made a charnel house,” said John James Ingalls, a Kansas politician. The Spanish-American War was a “popular” conflict in the literal sense — it was everyday Americans who made it inevitable.

But here American idealism collided with the legacy of American anti-militarism. Most of the minuscule Army was spread across the West. Enlistees poured forth, but it would take time to train them. As a short-term response, McKinley authorized three volunteer cavalry regiments (800 to 1,000 soldiers), to be drawn from the ranks of men whose skills and life experiences made them predisposed to martial pursuits: cowboys, policemen, even college athletes.