An undated protrait of Woodrow Wilson, the 28th president. (AP)

Michael Beschloss, a presidential historian, is the author of the new book “Presidents of War.”

On the Nov. 11 100th anniversary of the Allied victory in World War I, I’m celebrating the heroism of American warriors in Europe. Perhaps 116,000 of them died in that struggle. Their commander in chief, Woodrow Wilson, did not match the quality of their service. During the conflict, Wilson made serious mistakes as a political leader that should never be forgotten.

Wilson’s missteps in wartime were hardly his only defects. His most disgraceful flaw was his racism. Given his high-flown rhetoric as a professor about elevating humankind, Wilson especially stood out in his white supremacy. He was not a man of his time but a throwback. His two predecessors, Theodore Roosevelt and William Howard Taft, had looked far kindlier on African Americans and their rights.

In 1916, Wilson, a Democrat, narrowly won reelection, campaigning under false pretenses with the slogan “He Kept Us Out of War.” Privately, however, he knew it was quite possible that he would take the nation into the European struggle soon after starting his second term.

As an academic, Wilson had emphasized the need for presidents to explain military setbacks and other complex or mystifying events to Americans. Yet he spent much of 1917, the first year of U.S. engagement in the war, in kingly isolation, rarely using his luminous oratorical gifts to explain to his countrymen why they needed to make severe sacrifices for a conflict that wasn’t an obvious, direct threat to America’s national security.

Wilson, who preened as a civil libertarian, persuaded Congress to pass the Espionage Act, giving him extraordinary power to retaliate against Americans who opposed him and his wartime behavior. That same law today enables presidents to harass their political adversaries. Wilson’s Justice Department also convicted almost a thousand people for using “disloyal, profane, scurrilous or abusive language” against the government, the military or the flag. Wilson is an excellent example of how presidents can exploit wars to increase authoritarian power and restrict freedom, some arguing that criticizing the commander in chief amounts to criticizing soldiers in the field.

In the 1918 midterms, with the Great War heading to its climax, Wilson shamelessly exploited the military struggle for domestic politics, urging voters to support his party “for the sake of the nation itself” because Republicans were trying to take “the conduct of the war out of my hands.” This cheap maneuver backfired. Roosevelt and Taft charged that Wilson was asking for “unlimited control over the settlement of a peace that will affect them for a century.” Partly out of disgust with Wilson’s presumptuousness, voters switched control of both the House and Senate to the Republicans.

I admire Wilson’s insistence on ending the war with a League of Nations to ensure that such a conflict never happened again, but his plan to achieve it was clumsy political malpractice. He knew the Republican majority in Congress and many other Americans would be troubled by the possibility that if the Senate endorsed U.S. entry into the League of Nations, the new peace organization might have the right to call American troops into battle. Wilson should have immediately made it his central mission to assuage those fears, but he instead decamped to the Paris peace conference for months — certain, in his vanity, that no mere professional diplomat could match his negotiating skills. The domestic debate over the League of Nations was left to its loudest opponents, such as Henry Cabot Lodge, chairman of the Senate Foreign Relations Committee. By the time Wilson returned in the summer of 1919, fatal damage had been done.

Wilson’s famous failure to persuade Americans to accept his cherished league (he poignantly suffered a stroke while campaigning for it) had gargantuan consequences. It doomed the League of Nations’ potential to keep the world out of an even more ruinous war, decades later, as Adolf Hitler expanded his brutal reach in Europe and Japan fell under the spell of a militant, imperial regime.

In the late 1930s, when Franklin D. Roosevelt tried to awaken Americans to the possibility that they might have to fight to save the world from tyranny, perhaps his biggest obstacle was the bitter public memory of Wilson and World War I. Laboring under the millstone of the then widely detested 28th president, FDR managed to rearm the United States only in the nick of time.

One can admire Wilson for his progressive reforms, for his idealism and eloquence about America’s role in the world, as I do, without sugarcoating his displays of political incompetence as a president of war. In wartime, Americans have a right to expect that the bravery of U.S. troops is matched by brilliant political leadership in the White House. Too often in the past, World War I anniversaries have been transformed into paeans to Woodrow Wilson. This time, let’s keep it focused on the troops.