WASHINGTON — A day after certifying that Iran is obeying international restrictions on its nuclear program, the Trump administration went in the opposite direction Tuesday and slapped new sanctions on Tehran for unrelated alleged transgressions.

The Treasury Department blacklisted 18 individuals and entities for supporting Iran’s military and Revolutionary Guard Corps, accusing them of trying to build ballistic missiles, to steal U.S. computer software and of harassing U.S. naval vessels.

The sanctions mean it is illegal for U.S. citizens or companies to do business with those on the list, and any assets they have in the U.S. can be seized. It’s unclear if the 18 have such assets or businesses.

The back-to-back actions reflect the policy crosscurrents for President Donald Trump in trying to reconcile his campaign promises with the realities of foreign policy governance.

As a candidate, he vowed to “rip up” the 2015 Iranian nuclear deal, which was brokered by the five permanent members of the U.N. Security Council plus Germany.

The accord required Tehran to destroy or ship out most of its nuclear fuel and infrastructure and to submit to intensive monitoring to ensure it doesn’t cheat.

In exchange, the international community agreed to ease sanctions that had crippled Iran’s economy, allowing it to again export oil and rejoin the global financial system.

The U.N. nuclear watchdog, the International Atomic Energy Agency, has repeatedly said Iran is complying with the accord. The U.S. Energy Department has offered similar assurances.

But the White House has struggled to find a way between abandoning the deal, which could allow Iran to resume nuclear development and ultimately get a bomb, and holding Tehran accountable for its development of ballistic missiles and support for militant groups in Lebanon and Yemen.

Even if Iran is complying with the accord, Tehran is violating the “spirit” of the deal, State Department spokeswoman Heather Nauert said Tuesday.

“Iran’s other malign activities are serving to undercut whatever ‘positive contributions’ to regional and international peace and security were intended to emerge” from the nuclear agreement, Nauert said.

The nuclear accord does not address Iran’s ballistic missile program, its support for militant groups or its human rights abuses, and all remain under sanctions. During the negotiations, diplomats concluded it would be impossible to rein in Iran’s nuclear threat if other disputes were mixed in.

By law, the U.S. must certify to Congress every 90 days that Iran remains in compliance with the nuclear deal, and the Trump administration did so Monday night before a midnight deadline.

It came with last-minute drama as Trump balked at approving certification, despite the advice of his principal national security team, according to a person close to the White House who spoke on the condition of anonymity to describe the internal debate.

Secretary of State Rex Tillerson argued repeatedly that major allies were invested in the deal and needed more notice before the U.S. could argue that Iran wasn’t in compliance.

Trump’s national security adviser, H.R. McMaster, and other senior advisers also made the case for leaving the deal intact.

But Steve Bannon, Trump’s strategic adviser said the president should follow through with his promise to tear up the deal.

After nearly an hour, Trump agreed to support certification but demanded a plan for getting tougher on Iran.

Most of those sanctioned Tuesday are Iranian, but one company is based in Turkey and one individual is a Chinese national.

The State Department reissued calls for the release of U.S. citizens arrested in Iran.

tracy.wilkinson@latimes.com