Ruling on the judicial review application for a second time, Lord Justice Treacy said the PSNI had not recorded grounds for the stop and search, but relied on the authorisation itself as the basis.

“This practice is not in accordance with the code,” he said.

However, the judge confirmed that failure does not automatically render the exercise of the power unlawful or in breach of Article 8.

Written submissions provided by the police set out the basis for the stop and searches.

The court was told one senior officer stated: “Steven Ramsey is a know(n) dissident republican who currently associates with persons engaged in dissident terrorist activity.

“To that end I have ensured that all my operational staff are well briefed on the small number who would seek to do us harm.”

Another police officer said they had stopped Mr Ramsey due to confidential briefings, advising him that authorisation was in place due to the current threat in the area.

Lord Justice Treacy concluded: “Save for the acknowledgment that the PSNI, in failing to record the basis for the use of the power, was acting in breach of the requirements of the code of practice, the applicant’s extant grounds of challenge are dismissed.”