Updated at 3:51 p.m.

Defense Attorney Susan Church has been discharged after being held in contempt of court by Boston Municipal Court judge and being taken into custody.

Judge Richard Sinnott held Church, who was representing a counter-protester from this weekend's "Straight Pride" parade in Boston, in contempt on Wednesday after she began reading case law, making the argument that the judge had no authority to reject the prosecution's decision not to prosecute many of the counter-protesters.

After warning Church to stop reading, Sinnott declared Church in contempt and had her taken into custody by a court official. Church was detained for about two hours before being released by Sinnott.

"This was outrageous behavior," Church told reporters after her release, adding that she was detained "unlawfully and unreasonably" because she was "simply doing my job."

"All I was trying to do is to read the law to the court, and I was summarily arrested, handcuffed, brought down to the holding cell, held there for hours. ... [I] sat there wondering if I was going to jail that night, whether I’d be able to see my children at dinner that night, what I was going to do about my work and my clients, simply for advocating for my client," she said.

Sinnott declined to comment to WGBH News.

On Tuesday, Sinnott rejected motions by the Suffolk County district attorney's office to drop charges — ranging from disorderly conduct to resisting arrest — against many of the more than 30 counter-protesters from the Aug. 31 rally. The judge’s refusal to drop the charges drew criticism from District Attorney Rachael Rollins, the ACLU and others.

Read More: Judge Refuses To Dismiss Charges Against 'Straight Pride' Counter-Protesters

Another defense attorney representing the counter-protesters told WGBH News that the ACLU of Massachusetts has been contacted on Church's behalf.

“We are deeply troubled by the events of the last 48 hours, and are proud to represent Susan Church in this matter,” said Carol Rose, executive director of the ACLU of Massachusetts, in a statement. Rose is a contributor to WGBH News.

Following that incident, the majority of the remaining counter-protesters' cases proceeded, with Sinnott agreeing to dismiss charges in many cases.

About 200 marchers gathered for the self-described "straight pride parade," held in downtown Boston on Aug. 31, while several hundred others showed up to counter-protest. There was a large police presence, and 36 people were arrested.