By ,

FORMER VIRGINIA senator John W. Warner, a Republican widely revered for his national security expertise during a half-century of public service, had never supported a Democrat for president before he endorsed Hillary Clinton on Wednesday. It wasn’t the first time Mr. Warner, who retired in 2009, has bucked his party; famously independent-minded, he backed a Democrat to succeed him in the Senate. So it was unsurprising that some Republicans in Donald Trump’s camp sniffed at Mr. Warner’s declaration as fresh evidence of his party disloyalty.

The real question, though, is how anyone immersed in national security could possibly endorse Mr. Trump, whose extravagant ignorance of the issues and disdain for the United States’ allies and commitments are hallmarks of his candidacy.

The idea of installing Mr. Trump as commander in chief has chilled many of the most respected GOP figures in international affairs. They include former secretary of state George P. Shultz, who served almost seven years in the Reagan administration — “God help us,” said Mr. Shultz, on the prospect of Mr. Trump’s victory — and former secretary of state Colin L. Powell, who called Mr. Trump “a national disgrace and an international pariah.”

To Mr. Trump, of course, prominent Republican national security figures who oppose him are “political hacks,” as he sniped during this week’s debate about a list that includes two former homeland security secretaries, former directors of the CIA and of national intelligence, and dozens of other top officials who served GOP administrations at the Pentagon, the State Department and elsewhere.

In an open letter last month, those officials noted Mr. Trump’s meager understanding of international affairs, volatile temperament, and lack of “basic knowledge” of American values and institutions, concluding that he would be a “dangerous president” who would “put at risk our nation’s national security and well-being.”

How could Republicans who have overseen the nation’s defense and national security apparatus acquiesce to Mr. Trump’s cavalier and wildly inaccurate derision of the U.S. military (a “disaster”) and its personnel (“rubble”)? How could they endorse a draft dodger who made light of the Purple Heart and referred to the risks he faced from sexually transmitted diseases as his “personal Vietnam”? Mr. Warner, to his credit, would not countenance such nauseating talk.

Not so the vast majority of Republican elected officials, especially those running for reelection this year, who have meekly followed Paul D. Ryan (Wis.), the sheepish Republican speaker of the House, in kowtowing to Mr. Trump, often after having initially said they would never support him.

Against this example of cowardice on an epic scale, Mr. Warner, a World War II veteran, is a clarion voice of integrity.