NOT SURPRISINGLY, one of the first countries to probe the mettle of the Trump administration was Iran, which continues to seek hegemony in the Middle East at American expense. The prod was a familiar one: a test of one of Tehran’s medium-range ballistic missiles, which are capable of carrying a payload of more than 1,000 pounds — including a nuclear warhead. Over the objections of the United States and other Western powers, Iran has conducted a number of such tests since the signing of the nuclear accord in July 2015. Eager to avoid a rupture that would ruin a legacy achievement, the Obama administration played down the launches while applying mostly symbolic sanctions to entities involved in the missile program.

The Trump administration’s rhetorical response to the latest launch was much hotter. National security adviser Michael Flynn appeared before the media to dramatically assert that Iran was being put “on notice.” But when the first follow-up action came Friday, it was similar to that of the previous administration: targeted sanctions against officials and entities involved in acquiring materials for missiles. For a president who during his campaign had spoken of ripping up the nuclear accord and blowing Iranian boats in the Persian Gulf out of the water, it was a measured and modest step — which is a good thing.

The Trump administration is right to push back against Iranian aggression across the Middle East as well as the missile tests. But it should be strategic in doing so. Nullifying the nuclear accord would reopen the one threat from Iran that is, for now, contained: the enrichment of uranium that could be used in nuclear devices. What is needed are measures to address other pressing threats, including the thousands of Shiite militiamen deployed in Iraq and Syria; Iranian support for Houthi rebels in Yemen; threats to U.S. ships in the Gulf; and cyberattacks.

The missile launches are particularly troubling because they exploit a loophole allowed by the Obama administration in U.N. Security Council resolution 2231, which ratified the nuclear deal. Previously Iran was under a U.N. ban for conducting tests of ballistic missiles capable of carrying a nuclear warhead, but the resolution changed the language so that Iran was merely “called on” to comply. Though the United States, Britain and France have taken the position that the missile tests are “not consistent with” the resolution, Russia has sided with Iran, making U.N. enforcement action impossible.

If the response to the latest launch is limited to sanctions, the Trump administration will deserve credit for not rushing to measures that could provoke an escalation it is not prepared for. As it is, the response looked ragged: The U.S. Central Command was not given advance warning, according to The Post’s David Ignatius, even though U.S. soldiers and ships deployed across the Middle East could be vulnerable to Iranian reprisals. Nor is it apparent that U.S. allies were consulted, though sanctions are unlikely to be effective unless they are backed up at least by European governments.

Rolling back the gains Iran has made across the Middle East in the past decade will be, at best, a work of years. To succeed, the Trump administration will have to clarify priorities: Russia, which it regards as a potential ally in the region, has become Iran’s strategic partner. Leaving the Syrian regime of Bashar al-Assad in place will lock in Iranian domination where it matters most. Until it has a strategy for addressing such challenges, the administration will find it hard to impress the mullahs.