WASHINGTON — President Trump said Friday morning that the United States military had been “cocked and loaded” for a strike against Iran on Thursday night, but that he called it off with 10 minutes to spare when a general told him that 150 people would probably die in the attack.

In a series of tweets on Friday morning, Mr. Trump said he was prepared to retaliate against three sites in Iran for that country’s downing of an American surveillance drone, but that he pulled back because the death of that many Iranians would not be “proportionate to shooting down an unmanned drone.”

Mr. Trump said in an NBC interview later on Friday that news reports that he had called off the mission while it was underway were inaccurate. But two senior United States officials said again on Friday that the military had received the president’s go-ahead and that jets were headed toward targets in Iran when the mission was aborted.

[Update: Iranian force exults in downing of U.S. drone with a feast and a prayer]

Thursday’s on-again, off-again episode was another chaotic moment on the world stage for a president whose credibility with allies is already strained from two and a half years of delivering bellicose threats, sometimes without following through. But a person familiar with Mr. Trump’s thinking said that the president, for one, was pleased with Thursday night’s events because he liked the “command” of approving the strike, but also the decisiveness of calling it off.