Certain hawks are suggesting that President Trump all but guaranteed the Iranian attack on the Saudi oil industry when he declined to answer Tehran’s shootdown of a US drone with a military strike. They’re wrong — and the reasons why they’re wrong should guide Washington’s reactions now.

Trump is right: His restraint back then showed strength, not weakness. Iran’s rulers desperately want some disproportionate US response, because they need to escape the box of US economic sanctions.

As James Jay Carafano put it in Thursday’s Post, “The regime is flailing … Iran has lost approximately 90% of its oil-export markets. Over the long term, that’s close to a death sentence for the Iranian economy. Make no mistake, the mullahs are acting up out of weakness.”

The Saudi hit was another, bigger bid at the same goal — accompanied, again, by loud Iranian denials of wrongdoing.

If the president looks trigger-happy now, it could embolden other nations to get serious about end-running the sanctions. The prospect of a major Mideast war could panic oil markets — putting a different pressure on Trump to cut some face-saving deal that leaves Iran still free to go nuclear and march toward regional hegemony.

Tehran is escalating, and Washington should discourage that. But not at the cost of undermining a policy that’s working.

Noise from Iran’s leaders about how they’ll never negotiate unless sanctions are lifted and are “set for all-out war” is just another part of their game. It’s supposed to make the president think he’ll look weak if he shows restraint and out of control if he acts.

All of which means that the best response is one that lets Iran know it’ll pay a higher price if it keeps escalating but doesn’t come off as provocative in the eyes of the world.

Whether that’s diplomatic (publicly restarting talks toward a joint defense agreement with the Saudis and other Mideast allies, as Carafano suggested) or some deniable unconventional action (such as a cyberattack) is up to the president to work out with his advisers.

Stay tough — but stay smart, too.