A Londonderry man, stopped and searched under anti-terrorism legislation more than 150 times, has lost a new High Court challenge to the police actions.
Steven Ramsey claimed the powers were used to detain him in breach of his human rights.
A judge found today that PSNI failures to record the grounds for searches under scrutiny were inconsistent with a code of practice.
However, that was not enough to make the searches illegal.
Mr Ramsey is a former member of the 32 County Sovereignty Movement.
He has previously stated that he does not belong to any illegal organisation or political party and has no convictions for paramilitary activity.
The case centred on stop and search actions carried out under the Northern Ireland Justice and Security Act 2007.
Mr Ramsey claimed he was subjected to 35 searches in 2009, 37 in 2010, another 23 in 2011, 31 in 2012 and a further 30 up to August 2013.
Notes from some of the searches indicated that he was stopped due to "suspected dissident republican links" or "as a result of confidential briefings".
'Dissident terrorist activity'
The applicant, from Derry's Creggan area, contested the power to detain him on the basis that it breached his privacy entitlements under Article 8 of the European Convention on Human Rights.
His challenge against the PSNI chief constable and secretary of state focused on seven incidents after a code of practice was introduced in 2013.
It was contended that the stop and search power is not subject to adequate legal safeguards to prevent it being used arbitrarily.
Although the judge rejected Mr Ramsey's original challenge in 2014, the case was remitted to him on appeal for a fresh hearing.
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.
"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 known dissident republican who currently associates with persons engaged in dissident terrorist activity."
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."
Outside court Mr Ramsey's solicitor, Fearghal Shiels, said: "We will consider the detailed judgment of the court with a view to an appeal to the court of appeal."