After President Donald Trump ordered the killing of Iranian General Qassem Soleimani, a response from Iran was expected — the only questions being how extreme and what Trump would plan in return.

The world has an answer from Iran: airstrikes targeting two Iraqi bases used by U.S. troops.

NBC News’ Josh Lederman noted that Iran’s response was measured and largely commensurate with Trump’s attack on Soleimani, appearing “to have sought to leave Trump an off-ramp: score settled, no need to escalate.”

Rather than target civilians, Iran chose to aim its missiles at a U.S. military target; the strike occurred in Iraq, just as the U.S. strike that killed Soleimani; and the missiles hit their U.S. target at about the same time of night that Soleimani was killed.

Even more, following the attack on Iraqi bases, Iran’s supreme leader tweeted an image of the Iranian flag — just as Trump tweeted the American flag in his first response to the Soleimani attack.

“Iran’s military carried out the strike itself, using ballistic missiles launched from Iranian territory and acknowledged on the record by Iran’s government,” Lederman also noted. “That was a sharp contrast from Tehran’s usual modus operandi of using allied proxy groups in other countries to attack its targets while allowing the Iranian government plausible deniability.”

Iran also apparently hoped to avoid too many American casualties, thereby sidestepping an abundance of public outrage that would undoubtedly lead to an extreme response from Trump.

Following the strikes, Iran’s Foreign Minister Mohammad Javad Zarif said his country was not looking to escalate tensions or start a war but merely to “defend ourselves against any aggression.”

On Twitter, Zariff wrote: “Iran took & concluded proportionate measures in self-defense.”

The next move is up to Trump, Lederman wrote. It remains unclear what the casualties situation is at the two bases hit by Iranian missiles, though initial reports have been promising.

It also remains unclear as to whether the strikes constitute the totality of Iran’s response to Soleimani’s death, or if there could be more to come, Lederman noted.

But at present, it appears that Iran has offered Trump a way out of what was billed by Democrats as the beginning of inevitable conflict, thereby allowing “Trump as he seeks re-election to assert that his foreign policy decision-making had been vindicated when it mattered most.”

What comes next is difficult to predict with an unpredictable president. While Trump initially said that any Iranian response to Soleimani’s killing would be met “quickly & fully” and “perhaps in a disproportionate manner,” Lederman noted that the president’s tone changed after the strikes on Iraqi bases: “All is well!” Trump tweeted Tuesday.

“Assessment of casualties & damages taking place now. So far, so good!” he added.

The president is expected to deliver remarks on the situation mid-morning on Wednesday.

Read more.