By David Ignatius

In the military culture that shaped John McCain, there is no more important responsibility than the promotion boards that select the right officers for top positions of command. It’s a sacred trust in McCain’s world, because people’s lives are at stake.

McCain wrote in his memoir of the officer’s responsibility for those who serve under him: “He does not risk their lives and welfare for his sake, but only to answer the shared duty they are called to answer.” McCain made the most important command decision of his life when he chose Sarah Palin as his vice presidential nominee. Two weeks later, it is still puzzling that he selected a person who, for all her admirable qualities, is not prepared by experience or interest to be commander in chief. No promotion board in history would have made such a decision.

Because of Palin’s dynamism and political appeal, she’s being hailed as an “inspired choice,” to use President Bush’s words. And she certainly has energized the Republican ticket: The polls show it, as do the enthusiastic crowds. And if a politician’s primary responsibility is to get elected, this may indeed have been a sublime choice. But was it the right one? And what does it tell us about McCain? McCain is 72, and he has had a serious bout with a virulent form of cancer. Thus, he had a special responsibility to pick a running mate who could be, in effect, a deputy commander — someone who could take over for him if his health should fail. The country is at war, as McCain so often reminds us, and he was picking someone who might be responsible for the security of the nation.

McCain’s appeal is that he presents himself as a man of principle — a person who will do the right thing, even if it is politically costly. He did that in championing the troop surge in Iraq, and he has taken courageous stands in the Senate for years. He defied his party on issues he believed in — from ethics reform to climate change to torture.

But John McCain also likes to win. And he has an impulsive streak, sometimes bordering on recklessness, which is described by many of his friends and by McCain himself in his memoir, “Faith of My Fathers.” The desire to win, and the impulsiveness, converged in his decision to pick Palin — a bold move that has allowed McCain to regain his maverick identity.

Palin is an immensely engaging political personality. The reason she comes across as likable to most Americans is that she (BEG ITAL)is(END ITAL) likable. But that doesn’t make Palin a suitable commander in chief for a nation at war. She has almost no knowledge or experience of foreign affairs; no military leader would entrust command to someone so inexperienced or unprepared.

Barack Obama faces a similar question, but he has been in the national spotlight for four years and has traveled, studied, prepared — and he choose in Joe Biden a running mate who is one of the Senate’s genuine experts on foreign policy. The country will watch Palin’s performance in interviews and debates, but right now she seems a genuinely risky bet.

Thinking about the Palin choice, you begin to ponder other moves McCain has made on the road to winning the Republican nomination.

McCain was right a few years ago to warn that Bush’s tax cuts would have potentially ruinous fiscal consequences; now he favors extending the cuts that have produced a crisis of debt and deficit. Why did he switch his position, other than political opportunism? McCain even seems to have forgotten what saved his greatest legislative achievement, which is campaign-finance reform. When he was asked during the Saddleback Church debate which Supreme Court justices he would not have nominated, he named Ruth Bader Ginsburg, Stephen Breyer, David Souter and John Paul Stevens. It happens that those are four of the five justices who voted in 2003 to uphold McCain-Feingold.

In May 2006, after McCain had courted Rev. Jerry Falwell in an effort to win conservative support, I asked him if he was bending his principles for the sake of winning. “I don’t want it that badly,” McCain answered. “I will continue to do what is right. … If that means I can’t get the Republican nomination, fine. I’ve had a happy life. The worst thing I can do is sell my soul to the devil.” He was right.

David Ignatius’ e-mail address is davidignatius@washpost.com.