In the tense hours following the American killing of a top Iranian military commander, the country’s supreme leader, Ayatollah Ali Khamenei, made a rare appearance at a meeting of the government’s National Security Council to lay down the parameters for any retaliation. It must be a direct and proportional attack on American interests, he said, openly carried out by Iranian forces themselves, three Iranians familiar with the meeting said Monday.

It was a startling departure for the Iranian leadership. Since the establishment of the Islamic Republic in 1979, Tehran had almost always cloaked its attacks behind the actions of proxies it had cultivated around the region. But in the fury generated by the killing of the military commander, Maj. Gen. Qassim Suleimani, a close ally and personal friend of the supreme leader, the ayatollah was willing to cast aside those traditional cautions.

The nation’s anger over the commander’s death was on vivid display Monday, as millions of Iranians poured into the streets of Tehran for a funeral procession and Mr. Khamenei wept openly over the coffin.