President Trump has warned the US is "targeting" 52 Iranian sites and will strike "very fast and very hard" if Tehran attacks Americans or US assets.
His comments followed the US assassination of Qasem Soleimani, a top Iranian general, in a drone strike.
Iran has vowed to avenge his killing.
Mr Trump wrote on Twitter that Iran "is talking very boldly about targeting certain USA assets" in response to the general's death.
He said the US had identified 52 Iranian sites, some "at a very high level & important to Iran & the Iranian culture, and those targets, and Iran itself, WILL BE HIT VERY FAST AND VERY HARD" if Tehran strikes at the US.
"The USA wants no more threats!" Trump added.
The president said the 52 targets represented the 52 Americans held hostage in Iran for more than a year from late 1979, after they were seized at the US embassy in Tehran.
Shortly after Mr Trump's tweets, a US government website appeared to have been hacked by a group calling itself "Iran Cyber Security Group Hackers".
A message on the American Federal Depository Library Programme site read: "This is a message from the Islamic Republic of Iran.
"We will not stop supporting our friends in the region: the oppressed people of Palestine, the oppressed people of Yemen, the people and the Syrian government, the people and government of Iraq, the oppressed people of Bahrain, the true Mujahideen resistance in Lebanon and Palestine, [they] will always be supported by us."
The web page contained a doctored image of President Trump, depicting him being hit in the face and bleeding at the mouth.
"This is only small part of Iran's cyber ability!" [sic], the hackers wrote.
What happened earlier on Saturday?
Mr Trump's tweets followed a huge funeral procession for General Soleimani held in Baghdad, where he was killed on Friday.
Mourners waved Iraqi and militia flags and chanted "death to America".
Several rocket attacks shook the area shortly after the procession, including one in the Green Zone near the US embassy.
The Iraqi military said nobody had been hurt. No group has yet said it was behind the development. Pro-Iranian militants have been blamed for other recent attacks.
With Iran already threatening harsh reprisals for the killing of the Quds Force commander, President Trump has clearly determined that the best way to de-escalate is to raise the stakes in advance, making clear what will happen if Tehran follows through on its threats.
The Trump tweet is curious in many ways - not least the symbolic mention of 52 Iranian targets being held at risk - a reference to the 52 US hostages seized in the US Embassy in Tehran back in November 1979.
His mention of targets important "to the Iranian culture" suggests a much wider target list than just leadership, military or economic sites.
President Trump is struggling to establish some kind of deterrence. But the ball is now very clearly in Iran's court and it is very hard to see how Tehran can fail to act.
Mr Trump has pursued a contradictory policy ever since he abandoned the nuclear agreement with Tehran - increasing economic pressure, threatening military action, but actually doing very little, even when Iran shot down a sophisticated US drone and struck oil installations in Saudi Arabia.
Above all, he has repeatedly underscored his and Washington's fatigue with its military involvement in the region. This as much as anything else has undermined US deterrence, something Mr Trump is now seeking, belatedly, to restore.
Why did the US kill Soleimani?
General Soleimani was widely seen as the second most powerful figure in Iran, behind Supreme Leader Ayatollah Ali Khamenei.
The 62-year-old spearheaded Iran's Middle East operations as head of the elite Quds Force, and was hailed as a heroic national figure.
But the US branded the commander and the Quds Force terrorists, holding them responsible for the deaths of hundreds of US personnel.
Speaking on Friday afternoon, President Trump said Soleimani was "plotting imminent and sinister attacks" on US diplomats and military personnel in Iraq and elsewhere in the region.
The general was killed by an air strike at Baghdad airport early on Friday, on the orders of President Trump. The president said the action was taken to stop, not start, a war.
Iran's Ayatollah Khamenei said "severe revenge awaits the criminals" behind the US attack. Soleimani's death would double "resistance" against the US and Israel, he added.
Iraqis are also mourning the death of Abu Mahdi al-Muhandis, an Iraqi who commanded the Iranian-backed Kataib Hezbollah group and was killed along with Soleimani.
On Saturday the group issued a warning to Iraqi security forces to "stay clear of American bases by a distance not less [than] 1,000m (0.6 miles) starting Sunday evening", al-Mayadeen TV reported.
In response to Iranian threats of revenge, the US has sent 3,000 more troops to the Middle East and advised its citizens to leave Iraq.