Image copyright AFP Image caption The dispute arose over restrictions on the flying of the union flag at Belfast City Hall

The Police Service of Northern Ireland wrongly facilitated illegal and sometimes violent loyalist flag protest marches, a judge has ruled.

Mr Justice Treacy upheld a legal challenge to police decisions by an east Belfast resident.

The judge told the High Court in Belfast that police had not understood their powers over the protests.

Chief Constable Matt Baggott said the PSNI's response had been "measured" and they would appeal the judgement.

There were widespread loyalist protests when Belfast City Council limited flying the union flag in December 2012.

The judge was referring to protests that happened between December 2012 and February 2013.

'Operational dilemmas'

Mr Baggott said his officers had operated under "very challenging and difficult times" and believed the PSNI's approach during the protests had been "responsible".

The chief constable said they were studying the judgement carefully, but it had raised a number of operational dilemmas.

"This judgement does not appear to me to take full account of the sheer scale of the protests," he said.

A resident of the nationalist Short Strand area won a judicial review over the PSNI's "failure" to provide assurances that it would prevent any future parades past his home.

He claimed this breached his privacy and family life entitlements.

Lawyers for the resident argued that no notification was given for any of the parades in December or January.

Police instead allowed un-notified processions to take place and failed to arrest those involved in organising and taking part, they claimed.

'Unjustified enforcement inertia'

The court heard evidence from Assistant Chief Constable Will Kerr, who said police did not have powers to ban the protests but had powers to manage disorder.

ACC Kerr denied that the PSNI adopted a "laissez-faire" attitude to policing the parades and reiterated that their role was to collect evidence of those organising or taking part in un-notified parades and to refer them to prosecuting authorities.

Mr Justice Treacy said: "It is evident that ACC Kerr was labouring under a material misapprehension as to the proper scope of police powers and the legal context in which they were operating."

The judge said in the period following 8 December 2012 until about the start of January 2013, ACC Kerr "did not address himself to the question of whether to stop the weekly parade, nor did the police behave proactively, or at all, in relation to prosecuting those organising and participating in the parades".

Image copyright Pacemaker Image caption A long campaign of loyalist street protests took place following the council vote

The judge went on to say that the "impugned policing operation during the period complained of was characterised by an unjustified enforcement inertia".

The judge said the police had "misdirected themselves" into thinking the issue was legally complex.

"This was simply wrong and I consider that it was this misdirection which explains and led to the situation in which the police facilitated illegal and sometimes violent parades," he said.

No explanation was given for why, having facilitated some form of protest at Belfast City Hall, protesters were permitted to march back via the Short Strand when the return leg was associated with serious public disorder, the judge said.

He also said that, even though police had met with march organisers as far back as 9 January, the decision to take action against high profile organisers was not made until 25 February - after the decision had been made to stop the marches.

Image caption Solicitor Padraig Ó Muirigh described the judgement as "emphatic"

He said that ACC Kerr did not appear to have fully appreciated that an un-notified parade had the same status as one which took place in defiance of a Parades Commission determination.

Speaking after the judge's verdict, Mr Baggott said he took full responsibility for all decisions on policing the protests.

Police sources told the BBC they believe that trying to enforce the letter of law and stopping the protest parades could have resulted in widespread violence.

'Massive implications'

The resident's solicitor Padraig Ó Muirigh described the judgement as "emphatic".

"This is a very significant judgement which very clearly criticised the police response to illegal parades in the Short Strand last year," he said.

"It has massive implications for policing parades in the future."

The council's flag vote on 3 December 2012 was the catalyst for a long campaign of loyalist street protests, some of which resulted in violence.

More than 100 police officers were injured and more than 560 people have been charged or reported in connection with flag protests in Northern Ireland since that date.

Nationalists and republicans had wanted the union flag completely removed from Belfast City Hall, while unionists wanted it to remain as a permanent fixture.

The designated days option was adopted by Belfast councillors after Sinn Féin and the SDLP voted to support an Alliance proposal to limit the number of days the flag would be displayed from the building.