Environmentalists celebrated Wednesday after a federal court temporarily blocked enforcement of a recently enacted South Dakota law that aims to hit pipeline protesters with fines and up to 25 years in prison.

Legal experts and green groups have decried the law, officially titled the Riot Boosting Act, as a flagrant violation of the First Amendment of the Constitution that was obviously targeted at Keystone XL opponents.

"The so-called 'Riot Boosting' Act was clearly intended to suppress constitutionally-protected, peaceful protests of the Keystone XL pipeline," said Stephen Pevar, senior staff attorney with the ACLU, which filed suit to stop the law from taking effect. "We're glad the court recognized that these vague and overbroad laws threaten the First Amendment rights of South Dakotans on every side of the issue."

South Dakota is one of several Republican-controlled states to pass legislation in recent months to criminalize pipeline protests. In June, Texas Gov. Greg Abbott signed in to law a measure that would hit pipeline protesters with up to a decade in prison.

As Common Dreams reported in June, the Trump administration is also looking to punish anti-pipeline demonstrations at the federal level.

In his ruling on Wednesday, U.S. District Judge Lawrence Piersol wrote: "Imagine that if these riot boosting statutes were applied to the protests that took place in Birmingham, Alabama, what might be the result? Dr. King and the Southern Christian Leadership Conference could have been liable under an identical riot boosting law."

BREAKING: South Dakota's riot law enacted to target protesters of the Dakota Pipeline has been found UNCONSTITUTIONAL! this is a major initial victory in our fight against anti-protest laws. https://t.co/4LriYJf9lU — Nora Benavidez (@AttorneyNora) September 18, 2019

Dallas Goldtooth of the Indigenous Environmental Network applauded the court's decision as "a good step in protecting our right to organize, educate, and promote a sustainable future for all generations of life."

"As Dakota," said Goldtooth, "it is our duty to protect the land and water, and speaking up on behalf of these sacred elements is essential to that endeavor."