Scotland Yard said officers spoke to the man and considered his actions within the Public Order Act 1986.

A spokesman said: "This man was spoken to by officers with consideration given to relevant legislation and a decision was taken by officers at the time that the man was acting within the law. He was not arrested.

"Wearing, carrying or displaying of an emblem or flag, by itself, is not an offence unless; the way in which, or the circumstance in which, the emblem is worn, carried or displayed is such as to cause reasonable suspicion that the person is a supporter or member of a proscribed organisation.

"While support of and membership of ISIS is unlawful it is not a criminal offence to advocate the creation of an independent state."

The Public Order Act states that a person is guilty if he: "Displays any writing, sign or other visible representation which is threatening, abusive or insulting within the hearing or sight of a person likely to be caused harassment, alarm or distress thereby."

A Home Office spokesman said: “ISIS is a proscribed group. Showing signs you are a supporter of that group is an offence.

"It was an operational decision and we cannot comment on individual cases.”

The picture was taken less than a fortnight after Seifeddine Rezgui killed 38 tourists, 30 of whom were British, on a beach in Sousse, Tunisia.