Of all the disagreements that drove President Trump and then-Defense Secretary Jim Mattis apart, one of the most perilous had to do with blowing up Iranian boats. "Why don't we sink them?" the president would ask.

Acting on an obsession that went back to the campaign, Trump repeatedly asked his national security team for plans to blow up Iranian "fast boats" in the Persian Gulf during the first year of his presidency, according to two sources who directly heard Trump's requests and three other former senior officials briefed on them.

Trump appeared incredulous that the U.S. military hadn't sunk these small Iranian attack boats, and he viewed it as a humiliation and sign of weakness.

"So these boats, they get in, they come in really fast, they come in really close ... and they might have explosives on them and we don't even know," Trump said, repeatedly, in the recollection of a source who heard the president directly in the Oval Office.

"Can you believe this? And we don't do anything?"

There was just one problem: Iran's "fast boats" were harassing U.S. navy vessels less than in previous years. Such a disproportionate response from Trump could have quickly metastasized into war with Iran, these sources said.

The U.S. previously responded to Iranian naval provocations by attacking their ships and speedboats during the end of the Iran-Iraq War in the late 1980s.

Over the years since, Iran has persistently used its small attack boats, armed with machine guns and rocket launchers, to harass U.S. Navy vessels.

At times the confrontations in the Persian Gulf have become so testy that the U.S. vessels fired off warning shots.

Why it matters: The episode, first referenced last year by the Washington Post, shows Trump's often-contradictory national security impulses. While Trump has been eager to withdraw U.S. troops from their stations in the Middle East and Asia, he's also, at times, proposed military actions that could draw the U.S. further in.

We have seen this pattern throughout Trump's term. For example, he launched strikes against the Bashar al-Assad regime in Syria before announcing he was withdrawing U.S. troops from the region. He threatened apocalyptic war with North Korea — telling Kim Jong-un that there'd be "fire and fury" if he kept threatening America — and has at other times flirted with withdrawing all U.S. troops from the Korean Peninsula.

Mattis, who took pride in resisting Trump's errant instincts, never provided the plans to blow up the Iranian fast boats, according to three former officials involved in the deliberations. Former national security adviser H.R. McMaster had to try to pacify the boss.

While receiving the President's Daily Brief — on multiple occasions, and in at least one separate Oval Office meeting — Trump chastised McMaster about it.

A source who observed the exchange said McMaster replied: "Mr. President, this has happened in the past, but DOD [Department of Defense] is telling us it hasn't happened lately. ... So they're not that concerned about it."

Trump persisted: "OK, but if it happens again, what would we do?"

McMaster replied: "We've got them [DOD] looking at options."

As his presidency wore on, Trump became less interested in the boats.

That's probably because Iran stopped the "fast boat" harassment during the first summer Trump was in office, according to the U.S. Navy.

This change in Iranian behavior ultimately became a point of pride for the president.

The bottom line: Close observers of the Iranian military caution against reading too much into this narrow retreat from Tehran.

"From mid-2017 to mid-2018, it's likely that the Iranians were worried about the prospects of escalation with the U.S. in the Persian Gulf. More worried than perhaps any other time since the end of the Iran-Iraq War," says Behnam Ben Taleblu, an Iran expert at the Foundation for Defense of Democracies.

"But caution should not be mistaken for a change in Iran's asymmetric naval doctrine, capabilities or intentions. As always, Iran plays the long game."

"Just because Iran's naval harassment numbers have dropped, does not mean it hasn't found another medium to use, like drones, to signal resolve against the U.S."

Go deeper: