Many of his friends and colleagues ascribed his character to his years in the underground in the 1940s, when he sent Jewish fighters out to kill British officers whom he saw as occupiers. He was a wanted man then; to the British rulers of the Palestine mandate he was a terrorist, an assassin. He appeared in public only at night, disguised as a Hasidic rabbi. But Mr. Shamir said he considered those “the best years of my life.”

His wife, Shulamit, once said that in the underground she and her husband had learned not to talk about their work for fear of being overheard. It was a habit he apparently never lost.

Mr. Shamir was not blessed with a sharp wit, a soothing public manner or an engaging oratorical style. Most often he answered questions with a shrug and an air of weary wisdom, as if to say: “This is so clear. Why do you even ask?”

In 1988, at a meeting of the political party Herut, he sat slumped on a sofa, gazing at the floor as party stalwarts heaped praises on him. Shortly thereafter, he said: “I like all those people, they’re nice people. But this is not my style, not my language. This kind of meeting is the modern picture, but I don’t belong to it.”

Rather than bend to them, Mr. Shamir often simply outlasted his political opponents, who were usually much more willing to say what was on their minds, and sometimes to get in trouble for it. To Mr. Shamir, victory came not from compromise, but from strength, patience and cunning.