The PSNI today won its appeal against a verdict that senior commanders wrongly facilitated illegal and sometimes violent loyalist flag protest marches in Belfast.
A panel of three judges ruled that a decision to manage major disruption first and bring charges against offenders later was well within policing discretion.
They also held that proportionate steps were taken to protect the human rights of nationalist residents potentially exposed to the weekly demonstrations.
The judgment represents a major boost for the force as it prepares to deal with any contentious parades over the summer marching season.
Earlier this year police chiefs came under scathing judicial criticism for how they responded to weekly marches from east Belfast following a decision in December 2012 to restrict the flying of the Union flag at City Hall.
Legal proceedings were taken by a nationalist resident identified only as DB who claimed his Short Strand home was attacked by protestors.
He claimed this breached his privacy and family life entitlements under Article 8 of the European Convention on Human Rights.
It was also contended that police failure to prevent the parades contravened both the Public Processions (NI) Act 1998 and the Police (NI) Act 2000.
A High Court judge ruled in April that the commander in charge of the operation around the protests misdirected himself in believing he was hampered by law from stopping the parades and arresting participants.
During the period in question police did not behave proactively in relation to prosecuting those organising and participating in the parades, he found.
According to his assessment Assistant Chief Constable Will Kerr did not appear to have fully appreciated that an un-notified parade has the same status as one which takes place in defiance of a Parades Commission determination.
He also described the policing operation at that time as being characterised by "unjustified enforcement inertia".
Lawyers for the PSNI mounted an urgent appeal against the findings, claiming they were flawed and unfair.
They insisted police chiefs were fully aware they had the power to stop any illegal union flag protest marches, with plans in place to block the earliest marches.
Those intentions only changed after intelligence revealed loyalist paramilitary involvement in associated violence which could pose a risk to life.
The police attitude was public safety first, criminal justice consequences later, the court heard.
Judges were also told of the level of resources deployed to deal with troublemakers and the decision to bring charges against passive demonstrators.
Ruling on the appeal today Lord Chief Justice Sir Declan Morgan, who heard the case with Lord Justice Girvan and Mr Justice Weir, said: "The issues facing those policing this major public disruption which extended far beyond Belfast to all parts of Northern Ireland demonstrated the enormous difficulties for those policing modern societies in circumstances of community conflict and heightened tension.
"We consider that the decision to manage disruption and pursue a subsequent criminal justice charging policy was well within the area of discretionary policing judgment which such situations require in light of the challenges posed by the circumstances."
Sir Declan pointed out how management of un-notified processions had been left outside the competence of the Parades Commission, with police dealing with them using public order powers rather than through a tailored legislative scheme.
"We do not consider that there is anything in the management of the issues arising from these parades by police to suggest that the 1998 Act or Section 32 of the 2000 Act were undermined," he said.
Allowing the appeal, he added: "This was a difficult situation in which proportionate steps were taken to protect the Article 8 rights of the applicant and the other residents of the Short Strand."
Sir Declan refused leave to appeal the judgment on any point of law of general public importance.
But lawyers for DB can now directly take their case to the Supreme Court in London.
Sir Declan confirmed: "We will leave it to the applicant to pursue this by way of a petition to the Supreme Court."