President Obama and Secretary of State John Kerry were convinced their one-sided nuclear deal would lead to better relations with Iran, but it’s already doing the reverse.

Tehran has taken two more Americans hostage just this month — and followed up with a massive cyberattack on the US government, especially the State Department’s Office of Iranian Affairs.

The kicker: Iran is holding the nuke deal hostage — threatening to junk it if Obama tries to punish the country for its fresh outrages.

Wake up and smell the coffee, guys.

When they seized one of the new hostages, the Iranians also grabbed his computer and forced him to unlock it. That allowed the Revolutionary Guard to launch what The Wall Street Journal reports is a massive cyberattack.

And, of course, the new hostages — charged with spying, natch — join three other American citizens already held.

Tehran has also cracked down on Iranians advocating better ties with Washington, while dialing up the anti-American propaganda. There’s legal action, too, including a new ban on the import of any US-made consumer goods. They even shut down a KFC in Tehran.

(So much for the dreams of new openings in Iran for American businesses.)

In case there was any doubt, Supreme Leader Ali Khamenei reiterated his commitment to “Death to America” (while telling Americans not to take it personally).

Vintage Iran, in other words. Little different from the days of the 1979 Islamic Revolution that culminated in the taking of 52 American hostages and holding them in captivity for 444 gut-wrenching days.

Back then, the Jimmy Carter administration found itself unable or unwilling to respond forcefully. Likewise, Team Obama today.

Some in Congress want new sanctions targeted at, for example, the Guard officials behind the cyberattacks. But Obama and Kerry are instead lifting all US sanctions as part of the nuke deal.

And, again, Tehran says it will tear up the pact if Washington retaliates for the latest provocations.

Mind you, Iran has yet to see the vast bulk of the hundreds of billions of dollars it’s to receive under the deal — but it’s still threatening to renege. How much worse will it get once the first $100 billion or so has cleared?

This is the time to see if the Iranians mean it: Hit them with new sanctions before handing over that cash, and see if they pull out. Better to know now, at the lowest cost.

The president won’t do it, of course: He sees the nuke deal as key to his legacy, right up there with ObamaCare. Iran’s leaders know it — and they’re going to use this hostage ruthlessly.