This post has been updated.

President Trump is back to threatening nuclear countries again; this time, it's Iran. In a late-night, ALL-CAPS tweet Sunday, Trump issued his strongest threat to date against the country, whose nuclear deal the United States left this year.

But while it was his strongest threat as president, Trump has a long history of musing about war with Iran — dating back decades, in fact. And a lot of his past commentary has eerie parallels to today.

For much of the middle part of Barack Obama's presidency, Trump predicted that Obama would go to war with Iran in the name of winning reelection. But he has also outright talked about going to war there himself and even seemed to suggest it would be a legacy item if he ever became president.

Trump's commentary on Iran dates to the 1979 Iranian hostage crisis, when he said the United States should have rescued the hostage by force. But he went even further, suggesting the United States should have toppled the regime and taken its oil.

“I absolutely feel that [the U.S. should have sent troops], yes,” Trump told gossip columnist Rona Barrett in 1980. “I don’t think there’s any question, and there is no question in my mind. I think right now we’d be an oil-rich nation, and I believe that we should have done it, and I’m very disappointed that we didn’t do it, and I don’t think anybody would have held us in abeyance.”

Trump added, “That would have been the easiest victory we would have ever won, in my opinion.”

Trump in 2011 began floating his theory about Obama invading Iran — but he also suggested that he as president might do the same.

“I would never take the military card off the table, and it's possible that it will have to be used, because Iran cannot have nuclear weapons,” Trump said in a November 2011 video from his office. “But you've got to exhaust other possibilities.”

Trump in 2011 also said of a remote-control spying drone the Iranians captured that Obama should have “taken it out.”

In 2012, he said the United States could “blow them away to the Stone Age.”

And in 2013, Trump floated invading Iran as an alternative to striking Syria. He also talked about threatening military force to rescue jailed Christian pastor Saeed Abedini.

But most of Trump's commentary on this issue has to do with his bizarre — and ultimately disproved — theory that Obama was preparing to go to war with Iran for political purposes.

“Our president will start a war with Iran because he has absolutely no ability to negotiate,” Trump said in a 2011 video blog. “He's weak and he's ineffective. So the only way he figures that he's going to get reelected — as sure as you're sitting there — is to start a war with Iran.

“So I believe that he will attack Iran sometime prior to the election, because he thinks that's the only way he can get elected. Isn't it pathetic?”

Trump tweeted about this relentlessly.

When it didn't happen as he predicted before the 2012 election, Trump continued to wager that it would eventually happen — albeit for other political reasons.

But despite repeatedly warning that Obama would get us stuck in a war with Iran, Trump as president has repeatedly rattled his own saber.

Within two weeks of his inauguration, in another tweet featuring some ALL CAPS, he suggestively put Iran “ON NOTICE.” The next day, he said Iran was “playing with fire.”

And early this year, he suggested that Americans might lend some undefined assistance to protesters of the Iranian government.

It's tempting to compare Trump's Iran strategy to his “madman” North Korea strategy, given he pledged to “totally destroy” and inflict “fire and fury” upon Kim Jong Un's regime before sitting down at the negotiating table. And perhaps this is a similar amount of posturing.

But it's also worth noting that Trump has long spoken about war with Iran in pretty cavalier terms — and in ways that make lodging this threat midway through his first term somewhat difficult to completely dismiss as hot air.

Correction: This post misquoted a 2011 Trump interview with Bill O'Reilly. Trump's actual quote was: "Look, I am the strongest military person, and if I ever ran and won, I would be the strongest military president ever.”