Members of the Occupy movement can sue South Carolina Governor Nikki Haley for having them arrested outside the statehouse two years ago during an around-the-clock demonstration, a federal appellate court has ruled.

Occupy Columbia began its protest against economic inequality on October 15, 2011, at the state capitol. At the time, no regulation existed limiting how long demonstrators could remain on the grounds.

But after a month of constant protesting by the group, Haley ordered the Bureau of Protective Services to arrest anyone camping on the site after 6 pm. Nineteen individuals were taken into custody and charged. Several of those arrested responded by filing a lawsuit against Haley, claiming her actions violated their First Amendment rights.

Haley tried to justify her call for arrests by pointing to an emergency regulation by the state Budget and Control Board (which Haley chairs) that banned sleeping on Statehouse grounds. But the new rule made no reference to a 6 pm or any other curfew on protesting. Also, it was adopted after the arrests were made.

When the emergency rule expired, lawmakers approved legislation that Haley signed

prohibiting camping and sleeping at the capitol.

But the rule was not sufficient grounds to justify the arrests, the Fourth Circuit Court of Appeals ruled after receiving a petition from the protestors. The court also said the plaintiffs’ constitutional rights were violated, clearing the way for their lawsuit to proceed against Haley.

Drew Radeker, lead attorney for the Occupy protesters, said in an email to the Associated Press that his clients applauded the ruling, and that they had been targeted because of their beliefs.

“We have always maintained that the reason for our clients’ arrest was an unlawful order that singled these protesters out for punishment because a politician did not like them protesting at the State House,” Radeker wrote.

Haley’s office said no decision had been made whether to appeal the court’s decision.