A High Court judge has said "ill-informed debate" about bail decisions could undermine the rule of law.
Mr Justice McCloskey made the remarks during a bail application by flag protester, Jamie Bryson. Bail was denied.
Mr Bryson denies six charges related to the ongoing union flag protests and has been in custody since 2 March.
The judge made his comments after days of controversy over perceived treatment of loyalists by police and courts.
Mr Justice McCloskey said ill-informed debate about bail decisions could undermine the independence of the courts and undermine the rule of law.
Earlier this week, Northern Ireland's first minister, Peter Robinson, said there was a belief courts were treating the two sides differently with leading republicans getting bail in contrast to loyalists.
But at the bail hearing, Mr Justice McCloskey said where there was ill-informed debate involving comparisons between individual cases, it simply engendered confusion and misunderstanding.
He added this could have other serious consequences and could jeopardise the balance between judiciary and government.
A senior colleague of Mr Robinson, finance minister Sammy Wilson, responded by describing the judge's comments as "judicial arrrogance".
Speaking on BBC Radio Ulster's Talkback, he said that, as public servants, judges should be accountable to the public.
In a later statement, Mr Wilson said: "The notion that criticism of judicial decisions somehow undermines the rule of law is simply a nonsense.
"The Lord Chief Justice has made it clear that 'the criminal justice system should be administered in public and subject to public scrutiny'.
"The real threat to the rule of law is not posed through asking questions and raising legitimate issues of perception, but the failure to adequately explain why decisions are taken.
"What is needed are explanations which the public can understand and not an attempt to close down public debate."
Justice Minister David Ford said he was "baffled" by what the unionist politicians had said.
"At the beginning of the week Peter Robinson called on the judges to clarify what their position was. Frankly to ask a judge to explain their decision is exactly what they do in court every time they give a judgement," he said
Mr Ford said that politicians and "Sammy Wilson in particular" needed to educate themselves "in the way the law operates and the virtues of it".
He also added that it was important that judges have the independence of their office.
The judge's remarks came as it emerged that Mr Bryson was arrested in a converted attic of an associate pastor's home.
The 23-year-old, of Rosepark, Donaghadee, County Down, is the reported chairman of the Ulster Peoples' Forum set up in the wake of protests over the decision to limit flying of the union flag at Belfast City Hall.
He is charged with six offences involving encouraging or assisting offences, and taking part in an un-notified public procession.
As he appeared by video-link from Maghaberry Prison, a prosecution lawyer told the High Court a decision was taken to detain him after police studied video footage of him addressing crowds of demonstrators and allegedly encouraging them to offend.
A search operation at his home proved unsuccessful, and he also escaped police after being spotted in Kilcooley, Bangor last week, it was claimed.
"When they did attempt to apprehend the applicant, at the home of an associate, the associate attempted to prevent police from gaining entry into the house where they found Mr Bryson in the converted roof-space bedroom," the lawyer said.
The judge was told how the accused posted comments on social media sites as police hunted for him.
"He said the police weren't very good at their job because they haven't arrested him," the barrister said.
At one stage in his posting, Mr Bryson claimed Chief Constable Matt Baggott needed to use better tracking devices in a bid to locate him.
The barrister added: "He indicated he might hand himself in if he could walk. He said his legs are sore,"
She claimed if released, Mr Bryson would re-offend and encourage others to do so through his speeches.
Setting out the estimated £20m cost of policing the flag protests over the last three months, she added that the demonstrations have resulted in serious public disorder, injuries to police and significant losses suffered by the business community.
Defence counsel argued that his client can be seen in the footage liaising with police to ensure no trouble breaks out at protests.
"At all times Mr Bryson has been encouraging peaceful protests," he said.
"There is absolutely no suggestion at all that this man has been asking people to behave in an unlawful manner."
He said there was confusion over police now declaring that un-notified processions to Belfast City Hall were illegal.