In a win for the American Civil Liberties Union, South Dakota agreed Thursday to not enforce its “Riot Boosting Act,” decried by indigenous and environmental activists as a measure to stifle First Amendment rights and inhibit pipeline protests.

The bill, SB 189, signed into law by Gov. Kristi Noem in March, was part of a larger pipeline package. The law allowed South Dakota to sue any individual or organization for “riot boosting” or encouraging a protest where acts of violence occur. Under SB 189, individuals could have been criminally or civilly liable even if they “do not personally participate in any riot but directs, advises, encourages or solicits other persons participating in the riot.”

The package of bills, passed in preparation for the construction of the Keystone XL Pipeline, was meant to provide a legislative solution to “ensure the safety and efficiency of pipeline construction in South Dakota,” Noem said at the time.

But the package of bills faced swift and harsh criticisms in the state, particularly from Native American groups who felt the law targeted them. Indigenous activists have been the driving force behind the opposition to the Keystone XL, which is set to start construction soon.

Legal experts also feared the vague clause about “encouraging” or “soliciting” others to participate in a protest could be indiscriminately applied. It wasn't clear if that meant that sending an invitation to people to join a protest or writing a letter to the editor of a newspaper in support of protesters would fall under the law's purview.

A coalition of indigenous and environmental groups teamed up with the ACLU to sue the state over SB 189 and two mirroring criminal statutes, saying it violated the First and the 14th amendments.

In September, a federal court temporarily blocked the enforcement of the law through a preliminary injunction.

“Imagine that if these riot boosting statutes were applied to the protests that took place in Birmingham, Alabama, what might be the result?” U.S. District Judge Lawrence L. Piersol of South Dakota wrote, sharing concerns about how the law could be broadly exercised.

Now, the ACLU, its plaintiffs, and the state have come to an agreement that nullifies the law, pending court approval.

“South Dakota knew these laws couldn’t stand up to our legal challenge, so rather than face embarrassment they decided to capitulate,” Dallas Goldtooth, a plaintiff in the case affiliated with the Indigenous Environmental Network, said in a statement. “We will celebrate this win, but remain vigilant against further government attempts to outlaw our right to peacefully assemble.”

Vera Eidelman, staff attorney at the ACLU, said the settlement is not only a win for first amendment rights in South Dakota, but also for the country.

“There is a legislative trend around the country of legislatures passing bills that either seek to or, in fact, will chill dissent,” Eidelman said, referencing the more than 20 statehouse bills in the past two years that First Amendment advocates say criminalize protest and discourage political participation. “We hope this serves as a lesson to those legislatures.”

Noem said Thursday that if the agreement is approved by the court, her office will "begin work to update crimes that have been on the books since South Dakota became a state."

"It’s important to note that it is still illegal to riot in South Dakota," Noem said in a statement. "No one has the right to incite violence."