Washington: Accusing Iran of constantly demonstrating a destabilising influence, US Defence Secretary James Mattis said on Wednesday it was time Tehran shaped up and behaved responsibly, as tensions between the nations remained high after an all-caps Twitter warning from Donald Trump.

File image of US defense secretary James Mattis. AP

"On Iran, I think that what we have to look at is the destabilising influence that Iran has consistently portrayed and demonstrated throughout the region," Mattis told reporters during a US-Australia ministerial.

He alleged that the "only reason" Syria's Bashar al-Assad regime was in power was because Iran has "stuck by him, reinforced him, funded him." "We see the same kind of malfeasance down in Yemen, where they're fomenting more violence down there. We've seen their disruptive capabilities demonstrated from Bahrain to the kingdom," he said. "It is time for Iran to shape up and show responsibility as a responsible nation. It cannot continue to show irresponsibility as some revolutionary organisation that is intent on exporting terrorism, exporting disruption across the (Middle East) region," Mattis said in response to a question.

Mattis's warning came two days after US president Donald Trump threatened Iran of risking consequences "the likes of which few throughout history have suffered before."

Trump's Twitter warning had come in all caps, "To Iranian President Rouhani: "Never, ever threaten the united states again or you will suffer consequences the likes of which few throughout history have ever suffered before, Trump tweeted, adding that "We are no longer a country that will stand for your demented words of violence & death. Be cautious!"

Reacting to Trump's tweets, a senior commander in Iran's Revolutionary Guards had suggested that it was part of US's broader strategy. Iranian President Hassan Rouhani too had cautioned that America's hostile threats against his country may trigger "the mother of all wars."

The exchange of rhetoric came weeks after the US exited a landmark deal signed in 2015 which curbed Iran's nuclear activities in return for lifting of international sanctions. White House Deputy Press Secretary Hogan Gidley on Wednesday reiterated that Iran has to stop its "destabilising behaviour." "It has to stop its sponsor of terrorism. It threatens consistently this country, not to mention our only ally in the region, in Israel. And it's one of the reasons the president got out of the Iran deal, because we now know that the Iran deal did not prevent the pathway to a nuclear weapon, but in fact paved it," he said in response to a question.

Gidley said Trump was working with America's partners and allies across the world. ''Iran will be a topic tomorrow (Thursday) for the discussions with the European Union and get Iran to stop this kind of behaviour, he said. The president was serious in what he tweeted and said multiple times about holding Iran accountable and demeaning it stop this kind of behaviour, Gidley said.

The US is in talks with countries around the world to re-impose sanctions and hold the Iranian government responsible for the acts its government has been involved in many parts of the world, State Department spokesperson Heather Nauert told reporters at her news conference.