The killing by a US drone of one of Iran's most senior military leaders, General Qassem Soleimani, on January 3, 2020, brought an abrupt rise in tension between Tehran and Washington.
A year on, there are fears of a renewed clash between the two enemies, in the dying days of Donald Trump's presidency.
The top commander of Iran's Revolutionary Guard has warned that Iran is ready to respond to any American military pressure, while the US has flown bombers over the region and sent a submarine to the Persian Gulf.
What happened a year ago?
General Qassem Soleimani had reportedly arrived in Iraq from Beirut and was travelling in a convoy of vehicles as it left Baghdad airport when the US drone struck.
The general was killed, along with an Iraqi militia leader. There was fury at what was described as a "blatant attack on Iraq's sovereignty". Iran's Foreign Minister Javad Zarif called it an "act of international terrorism", and a "dangerous and foolish escalation".
Iran’s Supreme Leader Ali Khamenei vowed "harsh retaliation". Over the following days the military leader's portrait adorned the streets of Tehran. Crowds held up signs demanding revenge. The possibility of Iran and the US going to war seemed real.
What was the background to Soleimani's killing?
A signatory to the 2015 nuclear deal, Iran had agreed to big reductions in its nuclear programme in exchange for the lifting of sanctions.
But in 2018 President Trump, who had vowed to pull the US out of the agreement, acted on his word and American sanctions were reimposed.
Tehran responded by suspending its commitments under the deal a year later, increasing its enrichment of nuclear fuel.
Who was General Soleimani?
Qassem Soleimani had become Iran's most recognisable battlefield commander by the time of his death, seen as a figure of national resilience in the face of US pressure.
Little known until the US invasion of Iraq in 2003, he took control of the Revolutionary Guard’s elite Quds Force, responsible for the Islamic Republic’s foreign campaigns.
The US and Israel held him responsible for fighters in Syria backing President Bashar Assad and for the deaths of American troops in Iraq.
He became a close ally of Khamenei, to the extent that the Supreme Leader officiated the wedding of the general’s daughter.
How did the US justify his killing?
President Trump said the Iranian general was killed "to stop a war" but denied that the US wanted a "regime change" in Tehran.
He accused the general of plotting "imminent and sinister attacks". "We caught him in the act and terminated him", the president said, defending his order to kill the general.
"His reign of terror is over", Trump announced, saying the Iranian commander was "plotting to kill many more" Americans "but got caught."
How did Iran respond?
Tehran's first response went badly wrong. Just days after the general's death, a Ukrainian passenger jet was mistakenly shot down, killing all 176 people on board. It took three days before the authorities admitted human error.
Iran also retaliated by launching Operation Martyr Soleimani within days of the killing. A number of missile attacks targeted a military base in Iraq. There were no US fatalities but the Pentagon admitted dozens of American troops suffered traumatic injuries.
Since then, there have been more threats of retaliation which have increased in the run-up to the anniversary.
What has happened recently?
In November, an Iranian scientist who founded the country's military nuclear programme two decades earlier was killed in an attack Tehran blames on Israel.
As the anniversary approached, the U.S. sent B-52 bombers flying over the region and a nuclear-powered submarine into the Persian Gulf.
On Thursday, sailors discovered a limpet mine on a tanker in the Persian Gulf off Iraq near the Iranian border as it prepared to transfer fuel to another tanker owned by a company traded on the New York Stock Exchange.
No one has claimed responsibility for the mining, though it comes after a series of similar attacks in 2019 that the US Navy blamed on Iran. Tehran denied being involved.
On Friday, the head of Iran's Revolutionary Guard, General Hossein Salami, said Iran was fully prepared to respond to any US military pressure.
"We will give our final words to our enemies on the battlefield," he said at a ceremony at Tehran University to mark the anniversary.
What difference does the US presidential transition make?
Strategic calculations on both sides have been complicated by the political transition in Washington to President-elect Joe Biden’s administration, which may seek new paths in dealing with Iran.
Donald Trump's pardoning of Blackwater security contractors, serving long sentences over a massacre in Iraq, could also inflame tensions, feeding into anger over impunity in Iraqi killings.
Last week, rockets struck near the US embassy in Bagdad after being intercepted mid-air, in an attack blamed on hard-line pro-Iran groups operating in the country.
The situation has revived memories of the transition of power from President Jimmy Carter to Ronald Reagan four decades ago.
Fifty-two American hostages who had been held in Tehran for more than a year were finally released on the day of the new US president's inauguration, in what some saw as an attempt to humiliate his predecessor.
Correction: A previous version of this article erroneously described Hossein Salami as the head of the Revolutionary Guard Corps' Quds force. He is the head of the Revolutionary Guard Corps.