US District Judge Lawrence Piersol issued a temporary injunction on Wednesday, blocking a recently enacted South Dakota anti-riot act.

The act was drafted by South Dakota Governor Kristi Noem in anticipation of protests against the construction of the Keystone XL oil pipeline, slated to start in 2020.

The court adopted the defendant’s suggestion of intermediate scrutiny to review the law and determined that while there was a “substantial government interest in criminalizing participation in a riot with acts of force or violence … [the statute goes] far beyond that appropriate interest.” Therefore, the statute “impinge[s] upon protected speech and other expressive activity as well as the right of association” and are not “narrowly tailored” enough to “further the government’s interests.”

The court said that under the current language of the statute, “Giving a cup of coffee or thumbs up or $10 to protestors is encouraging the protestors,” and these kinds of activities are protected speech or expressive activity.

The court also drew from historical events, making a comparison to Martin Luther King, Jr.’s protests. The court said that King “could have been liable under identical riot boosting law” for his behavior during the Birmingham demonstrations.

Dallas Goldtooth, with the Indigenous Environmental Network, celebrated the decision by saying: “[a]s Dakota, it is our duty to protect the land and water, and speaking up on behalf of these sacred elements is essential to that endeavor. This decision is a good step in protecting our right to organize, educate and promote a sustainable future for all generations of life.”