A federal judge on Thursday blocked a controversial “religious freedom” law in Mississippi from taking effect.

Mississippi's Protecting Freedom of Conscience from Government Discrimination Act (House Bill 1523) allows businesses to deny services to LGBT people based on their “sincerely held religious beliefs or moral convictions.” U.S. District Court Judge Carlton Reeves issued his order on the eve of House Bill 1523 taking effect.

Reeves wrote that the law violates “both the guarantee of religious neutrality and the promise of equal protection of the law.”

“Religious freedom was one of the building blocks of this great nation, and after the nation was torn apart, the guarantee of equal protection under the law was used to stitch it back together,” Reeves wrote in his 60-page ruling. “But HB 1523 does not honor that tradition of religious freedom, nor does it respect the equal dignity of all of Mississippi's citizens.”

Plaintiffs in the lawsuit include 13 individuals and two organizations, Joshua Generation Metropolitan Community Church and the Campaign for Southern Equality (CSE). It is one of several lawsuits challenging the law.

Roberta Kaplan, lead counsel for the Campaign for Southern Equality, said that in striking down the law, “the Court enforced the fundamental constitutional principle that the government cannot establish any religion. As a result, Mississippi will no longer be permitted to favor some 'religious beliefs' over others, and the civil rights of LGBT Mississippians will not be subordinated to the religious beliefs of only certain religious groups [opposed to LGBT rights].”