Saturday’s attacks on two key Saudi oil installations were plainly beyond the capabilities of the Yemen-based Houthis who took credit: The real villain, without question, is Iran.

Which means that Team Trump needs to find a response that will teach Tehran the right lessons.

Iran is clearly testing President Trump, to see if he can be bullied into unilaterally easing US sanctions. It has interpreted as signs of weakness his decision against a military response to its downing of a US drone, his recent openness to negotiations and his firing of national security adviser John Bolton.

To be clear: This wasn’t just an attack on Saudi Arabia, it was a bid to destabilize the global energy market. The damage shut down half of the kingdom’s crude oil production, taking out about 5.7 million barrels a day, or 5% of the daily world production of crude.

Oil prices surged about 19%, the biggest jump since the start of the 1991 Gulf War, on the news. If the Saudis report that repairs will take weeks or months, the jump will continue.

Nor is it Iran’s only assault on those markets: Its ongoing seizure of oil tankers — another one on Monday — and other saber-rattling in the Persian Gulf also plainly aim to boost fears that supply will be disrupted.

All of which adds to pressure on Trump to let Iran sell its oil, which would both boost supply and reduce fears of an all-out effort to block the Gulf.

As a net energy exporter, the United States can weather the direct effects of this disruption just fine. But the rest of the world economy, including already-troubled Europe, is at higher risk — and the global slowdown has already been causing problems for US employers.

Trump said America is “locked and loaded” to respond, but he clearly needs to consult with the Pentagon about exactly how. In response to Iran’s violence, US military action has to be on the table.

The regime in Tehran needs to learn that it can’t get away with this escalation, or it will keep upping the stakes in order to make Trump fold.