The months of planning behind US-Israeli mission to target Iran's supreme leader
Gordon Corera
BBC Security analyst
The attack that killed Iran's Supreme Leader Ayatollah Ali Khamenei came not in the middle of the night, as might have been expected, but in the middle of the morning.
That was because the US and Israel decided to take advantage of a piece of crucial intelligence that had arrived hours before.
For months, they had been watching for a moment of opportunity when senior Iranian figures might be meeting and they learnt Khamenei was going to be at a compound in central Tehran on Saturday morning.
They also had a fix on the location of other senior military and intelligence figures meeting at the same time.
For months the US and Israel had been tracking the supreme leader's movements. The exact methods they used are secret although US President Donald Trump in a social media post did hint at them.
"He was unable to avoid our intelligence and highly sophisticated tracking systems."
This could have been a human source reporting back but it may be more likely to be technical tracking of Iranian individuals.
Trump and his team monitored events from a makeshift war room in Mar a Lago
In the 12-day war last June, Israel targeted scientists and officials linked to Iran's nuclear programme and was reported to have been using penetration of telecoms and mobile phone systems to understand the movement of individuals.
That included sometimes tracking the movements of bodyguards who were linked to key officials.
Over the long term, this can help build up a "pattern of life" to predict and understand activity as well as search for moments of vulnerability.
Iran knew the supreme leader was in the sights of its enemies and so the failure to identify and deal with these vulnerabilities in the intervening months suggests a deep failure for Iranian security and counterintelligence or else the ability of Israel and the US to continue to adapt their methods to find new ways of tracking.
The Iranians may also have calculated that a daylight attack was less likely.