Years before his all-caps Twitter threat, Trump used to accuse Obama of looking to start a war with Iran

  • President Trump's bellicose words seem to clash with his prior stance on picking fights with Iran.
  • In 2011, Trump predicted in a tweet that then-President Obama would start a war with Iran "in order to get elected" to a second term.

Years before President Donald Trump sent his all-caps tweet threatening Iranian President Hassan Rouhani, he had warned that his predecessor, Barack Obama, would use the prospect of a war with Iran for political advantage.

Late Sunday, Trump tweeted that Rouhani must "NEVER, EVER THREATEN THE UNITED STATES AGAIN" lest he "SUFFER CONSEQUENCES THE LIKES OF WHICH FEW THROUGHOUT HISTORY HAVE EVER SUFFERED BEFORE."

Trump's tweet, the latest instance of the rising tensions between the U.S. and Iran, appeared to be a response to Rouhani's admonition on Sunday that a war between the U.S. and Iran would be the "mother of all wars."

Despite his bellicose tweet, Trump used to express suspicions in prior tweets years ago that Obama would start a war with Iran "in order to get elected" to a second term.

It wasn't just an off-hand remark; Trump repeated the sentiment that Obama would attack Iran as a political calculation in subsequent tweets over the next four years:

The president's salvo against Rouhani comes as Trump slaps punitive sanctions back on Iran after he announced the U.S. withdrawal from the 2015 nuclear deal brokered during the Obama administration.

The White House didn't immediately respond to CNBC's request for comment on Trump's previous tweets.