At a ceremony which took place at a church on Sunday, Texas Governor Greg Abbott signed a bill into law that prohibits the government from compelling clergy to testify regarding their sermons, or to produce copies of their sermons for a civil or administrative proceeding.

Senate Bill 24, also known as the “Sermon Safeguard Bill,” came about after the city of Houston issued subpoenas to five pastors when they tried to repeal the Houston Equal Rights Ordinance (HERO), a city ordinance which granted access to public facilities according to gender identity.

The city required the pastors to submit “all speeches, presentations or sermons related to HERO, the Petition, Mayor Annise Parker, homosexuality or gender identity prepared by, delivered by, revised by or approved” by them or in their possession.

“You are freedom fighters,” said Abbott at the bill-signing which took place at Grace Community Church in Woodlands, one of the churches to which a subpoena was issued. “You realized that when subpoenas were issued on your own pastor, when you had to fight against your own government right here in Houston for your freedom — your freedom of religion.”

“Texas law will now be your strength and your sword and your shield,” Abbott went on. “You will be shielded from any effort by any other government official in any other part of the state of Texas from having subpoenas to try to pry into what you’re doing here in your churches.”

Texas Lt. Governor Dan Patrick, who attended the ceremony with Abbott, said the new law “will give pastors critical protection from forced testimony and shield sermons from government subpoena power.”

Meanwhile, the bill-signing at Grace Community Church drew some protests, according to reports.

“What we witnessed today was Dan Patrick and Greg Abbott giving active sermons before the signing of a bill,” Joshua Douglas told KHOU. “We had strong conflict with the choice of this venue. We felt it was infringing on the separation of church and state.”