The War That Ended Peace: The Road to 1914. By Margaret MacMillan. Random House; 739 pages; $35. Profile Books; £25. Buy from Amazon.com, Amazon.co.uk

MILLIONS of people did not have to die in the first world war. That is the grim message of Margaret MacMillan’s magnificent new book. Had Europe’s leaders in 1914 been wiser and more far-sighted—had they pulled back from the brink, as had happened in earlier crises—Europe and the world could have avoided grief and ruin.

“The War That Ended Peace” will certainly rank among the best books of the centennial crop. Ms MacMillan, an Oxford don and great-granddaughter of Lloyd George, a fiery British wartime prime minister, deftly navigates the roiling currents and counter-currents of the pre-war decades. These were golden years for Europe. Peace had mostly reigned since the Battle of Waterloo a century before. Medicine and sanitation were improving. Communication and trade were exploding. Before 1914 Germany and Britain had become each other’s largest trading partners.

But the forces for war proved stronger. Military bosses prepared attack plans, and often barely consulted their civilian leaders. Germany and Britain raced to build more and better warships. Some hawks even promoted the concept of a “preventive war”, to thwart strengthening foes. Almost no one anticipated a long, agonising fight from the trenches.

The Great War had a kaleidoscope of causes. Ms MacMillan tackles them all, with the blend of detail and sweeping observation that underpinned her earlier, prize-winning book “Peacemakers”, about the 1919 Treaty of Versailles and its aftermath. Here she traces the shifting European alliances that ultimately pulled one nation after another into the war. As in “The Sleepwalkers”, Christopher Clark’s excellent recent book about Europe’s road to war, she does not shy from the complexities of the Balkans and their links with Austria and Russia.

National pride was a potent force. Russia, bruised by setbacks in the Balkans and its 1904-05 war with Japan, hoped that war could kindle nationalism. Germany, unified by Otto von Bismarck but no longer bound by his restraint, was hungry for empire and respect. (“For if we are to bleed to death, England shall at least lose India,” Kaiser Wilhelm II declared at the war’s outbreak.) Italy, a bit player, “always jumped at the chance to be treated as a great power”. Ms MacMillan notes the importance of public opinion in countries that had just shed feudalism and were coping with rising tides of socialism and nationalism.

Ms MacMillan’s core point is that the Great War was ultimately the product of individual choices—and the men who led Europe made poor ones. “Very little in history is inevitable,” she writes. Her capsule portraits reveal a cadre of weak leaders flummoxed by change, from the “easily swayed” Russian tsar to the “intense, self-confident and vain” chief of the Austro-Hungarian armed forces, Conrad von Hötzendorf. At the centre of the drama was the German Kaiser. To Sir Edward Grey, the British foreign secretary, he was “like a battleship with steam up and screws going, but with no rudder, and he will run into something some day and cause a catastrophe.” (The Kaiser, in turn, scorned the British as “mad, mad, mad as March hares”.)

“It was Europe and the world’s tragedy in retrospect,” Ms MacMillan writes, “that none of the key players in 1914 were great and imaginative leaders who had the courage to stand out against the pressure building up for war.”

Part of the problem was that brinkmanship had become a bad habit in Europe. In the Balkan wars of 1912-13 and earlier crises, Europe’s great powers had nearly tipped toward war but pulled back. Such encounters had instilled false confidence that war could be averted. But in 1914, chance was also partly at play. Some of the figures who sought peace in Europe died before they could lend a restraining hand. The most ironic is Archduke Franz Ferdinand, heir to the Austro-Hungarian throne, who had tried to sidestep earlier Balkan conflicts. “Please restrain Conrad,” he wrote of the hawkish Austrian military chief in 1908. “He must stop this warmongering.” Yet it was Ferdinand’s assassination in Sarajevo by a Serbian nationalist in June 1914 that sparked the conflict.

Sadly, some leaders had second thoughts as the Great War began. After the assassination in Sarajevo, Austria-Hungary delivered a harsh ultimatum to Serbia. Germany was prepared to come to Austria-Hungary’s aid. Yet the Kaiser hesitated. “The only thing that emerges clearly is that he no longer wants war, even if it means letting Austria down,” one German official wrote in his diary in July 1914. He added, tellingly: “I point out that he no longer has control over the situation.”