Stopping and questioning Manchester Arena terrorist Salman Abedi after he flew back to the UK could have led police to the bomb, the public inquiry has heard.
Pete Weatherby QC, representing some of the bereaved families, said the Manchester-born suicide bomber had left the UK with his family on a one-way ticket to Libya on April 15 2017.
But he returned, carrying only hand luggage, five weeks later - four days before he carried out the atrocity, killing 22 innocent bystanders and injuring hundreds of others, on May 22 2017.
Mr Weatherby, questioning a senior MI5 officer, known only as Witness J, said a "port stop" or "port action", where someone is questioned and searched, could have revealed his plans by something he said or something being uncovered on his phone.
On arrival in the UK, Abedi, 22, immediately bought a new phone and SIM card at Manchester Airport and took "anti-surveillance" measures to stay "off grid" by getting a bus and taxi - going straight to where he had left the bomb components.
Mr Weatherby said: "It's certainly possible you would have observed slightly unusual behaviour at the airport then followed it on and, as I say, he would have led you to the bomb.
"If he had been stopped by police, putting that together, there's a chance it would have stopped him carrying out the plot?"
Witness J replied: "Conceivably, yes. To offer some context, for us, or the police in combination, to follow the trail would have required us to be running a very high priority investigation.
"It would require almost certainly surveillance, normally allocated high priority investigations.
"We had fragments of what we know now. We had a blurred picture at that time and we did not conclude we had intelligence related to attack planning."
Witness J has told the inquiry it would have been a "better course of action" for Abedi to have been subject to a port stop, but maintains this was a "reasonable judgment" and may not have stopped the bombing anyway.
But inquiry chairman Sir John Saunders questioned whether this was a "big leap of faith" by MI5, and whether Abedi might have been "put off" if he had been stopped and suspected MI5 "are on to me".
Witness J said post-attack reviews concluded a "successful pre-emption of the attack would have been unlikely".
He added: "I support that judgment because I have seen the material. The planning was well under way by the time he went to Libya."
The chairman said he would be "looking critically" at the issue during "closed" hearings, where families of the bereaved, their lawyers and the press will be excluded while matters of national security are examined.
Abedi was a closed subject of interest (SOI) for MI5, meaning he was not under investigation and was one of 20,000 such closed SOIs at the time, with the security services also running 3,000 "live" anti-terror investigations.
Witness J said MI5 was under pressure with the workload increasing as 850 UK nationals travelled to Syria, where so-called Islamic State had established its caliphate, with fighting continuing in neighbouring Iraq, and Libya also descending into civil war.
Earlier, the inquiry heard that Abedi was known to have associated with at least eight other suspect individuals linked to terrorism, and the area of south Manchester where he lived had been identified as having a potential problem with extremism and radicalisation.
The inquiry is looking at all the background to the attack, which was carried out by Abedi with the help of his younger brother, Hashem, who was jailed for life for his part in the plot.
The hearing continues.