The tweet was accompanied by an image of a silhouetted Mr. Obama holding a gun to his head with the caption “We welcome no war, not do we initiate any war, but If any war happens, the one who will emerge loser will be the aggressive and criminal U.S.”

The tweet has gained over 500 retweets and nearly 200 favorites so far.

Many commenters mocked the tweet, not taking the threatening image seriously.

Last weekend Mr. Khamenei spoke about the Iranian nuclear deal while holding a kalashnikov in his hand. He said U.S. policies in the region were “180 degrees” opposed to Iran‘s. The speech was punctuated with chants of “Death to America” and “Death to Israel.”

U.S. Secretary of State John Kerry said Mr. Khamenei’s speech vowing to defy American policies in the region despite a nuclear agreement with Tehran was “very troubling.”

“I don’t know how to interpret it at this point in time, except to take it at face value, that that’s his policy,” he said in an interview with Saudi-owned Al Arabiya television Tuesday, Reuters reported.

“But I do know that often comments are made publicly and things can evolve that are different. If it’s the policy, it’s very disturbing, it’s very troubling.”

Under the nuclear deal, reached in Vienna last week, Iran will be subjected to long-term curbs on its nuclear program in return for the lifting of Western economic sanctions.