President Trump on Sunday threatened Iran on Twitter.

"If Iran wants to fight, that will be the official end of Iran," Trump said. "Never threaten the United States again!"

The tweet comes days after Iran warned that missiles could hit US ships in the Gulf.

Read more stories like this on Business Insider's homepage.

President Donald Trump on Sunday afternoon tweeted a stark warning against the government of Iran as tensions between the two countries have escalated in recent weeks.

"If Iran wants to fight, that will be the official end of Iran," Trump said on Twitter. "Never threaten the United States again!"

Trump's warning came two days after Iran's elite Revolutionary Guards warned that Iranian missiles could hit US ships in the Gulf.

Earlier in May, the US government sent an aircraft carrier and fleet of bombers to the Persian Gulf in response to what the US said were signs that Iran could be preparing to attack US forces in the region.

Read more: How the Trump administration got into a showdown with Iran that could lead to war

The Pentagon has reportedly presented Trump with an updated plan to send 120,000 troops to the Middle East should Iran attack US forces or relaunch its bid to build a nuclear weapon.

Despite Trump's public and social media rhetoric, he has privately told close advisors including Acting Secretary of Defense Patrick Shanahan that he would like to avoid war with Iran, the New York Times reported earlier this week.

And while Iran has continued to publicly issue warnings, so far the confrontation hasn't boiled over into fighting.