Police stop, search and question operations involving a former IRA hunger striker and a brother-in-law of Martin McGuinness were unlawful, a court ruled today.
Senior judges held there was a lack of adequate safeguards against potential abuse of the system in the cases of Bernard Fox and Marvin Canning.
Both men are now to seek damages over PSNI actions taken against them under the Justice and Security (Northern Ireland) Act 2007.
Canning, from the Glendara area of Derry, claimed powers used to stop and question him up to 100 times were incompatible with his right to privacy under European law.
The 55-year-old, who is related to the Deputy First Minister through marriage, alleged that officers were sometimes oppressive and confrontational.
He denies any involvement in terrorism but confirmed he is a member of the 32 County Sovereignty Movement, stating it is not an illegal organisation.
Police rejected claims that powers under the Act were arbitrarily used against him.
A similar legal challenge was brought by Fox, who took part in the 1981 IRA hunger strikes inside the Maze Prison, and his companion Christine McNulty.
The Belfast man served more than 20 years in prison for offences including possession of explosives before being released under the terms of the Good Friday Agreement.
Police stopped a car he and Ms McNulty were travelling in near Camlough, Co Armagh in March 2011.
Their vehicle was searched for munitions, while an officer allegedly took Ms McNulty's handbag and went through its contents.
Fox denies any involvement with dissident republican activities.
Police argued that the power was not intended to be used randomly, but rather on the basis of threat.
Lawyers in both cases were seeking to overturn a High Court decision that no violation under the European Convention on Human Rights had occurred.
Delivering judgment in the Court of Appeal today, Lord Justice Girvan identified the absence of a code of practice for stop and question operations under Section 21 of the Act.
He said the legal framework pending the introduction of an effective code does not contain the kind of safeguards against potential abuse or arbitrariness envisaged by Strasbourg case law.
"Pending the introduction of such a code the PSNI does not have a proper Convention law compliant basis for exercising the section 21 power," he ruled.
Although amendments have been made to the section dealing with stop and search actions, Lord Justice Girvan also held for Fox and Ms McNulty based on the situation at the time.
He said: "Since adequate safeguards to prevent the arbitrary exercise of the power under Section 24... had not been put in place the power contained therein was not properly exercisable."
A further hearing will now be held to determine legal remedies in both cases.
Outside the court Fearghal Shiels of Madden & Finucane solicitors, representing Fox and Ms McNulty, welcomed the finding that the search had no proper legal basis.
Pledging further legal action over the alleged continued abuse by police of its powers, he added: "We shall now pursue an action for damages on their behalf."
Canning's solicitor Paul Pierce, of Kevin R Winters and Co, said: "Our client has been stopped up to 100 times by police before, during and after these judicial review proceedings.
"The court has now ruled that this power is open to abuse and is not in accordance with the law."
Mr Pierce claimed police cannot act properly until the Secretary of State puts in place a code of practice.
He added: "If they continue to use these powers that are now deemed to be incompatible with the European Convention on Human Rights that may give rise to further civil action."