Texas Gov. Greg Abbott (R) has signed into law a bill that protects fast food chain Chick-fil-A and other businesses that donate to anti-LGBTQ groups.

SB 1978, known as the “Save Chick-fil-A Bill,” prohibits any state government agency from taking “adverse action” against individuals or companies for their affiliation to a religious organization. The legislation, signed by Abbott on Monday, takes effect on Sept. 1.

Republicans in the Texas legislature introduced the legislation in March, soon after the San Antonio City Council blocked Chick-fil-A from opening a restaurant at San Antonio International Airport. San Antonio Councilman Roberto Treviño cited the Georgia-based company’s long history of supporting anti-LGBTQ organizations as a factor.

“San Antonio is a city full of compassion, and we do not have room in our public facilities for a business with a legacy of anti-LGBTQ behavior,” Treviño said at the time. “Everyone has a place here, and everyone should feel welcome when they walk through our airport.”

Chick-fil-A has reportedly donated hundreds of thousands of dollars to anti-LGBTQ groups, including Exodus International and the Family Research Council, which describe themselves as Christian organizations.

The company first stoked controversy in 2012, when its billionaire CEO, Dan Cathy, spoke out against same-sex marriage.

Proponents said SB 1978 protects the First Amendment rights of Texas. But critics said it simply offers cover to bigoted entities.

“It’s been cloaked in religious freedom, but the genesis, the nexus of this bill, is in hatred,” state Rep. Celia Israel (D) said on the Texas House floor in May.