Sitting amid several plastic fast-food cups, Texas Gov. Greg Abbott signed the so-called Save Chick-fil-A bill into law on Thursday.

“Today I signed the @ChickfilA law in Texas. And, had a great lunch,” Abbott wrote on Twitter. “No business should be discriminated against simply because its owners gave to a church or to the Salvation Army or to any other religious organization.”

Today I signed the ⁦@ChickfilA⁩ law in Texas.



And, had a great lunch.



No business should be discriminated against simply because its owners donate to a church, the Salvation Army, or other religious organization.



Texas protects religious liberty. pic.twitter.com/1QwSTuoWu0 — Greg Abbott (@GregAbbott_TX) July 19, 2019

The legislation, known as Senate Bill 1978, prohibits government entities from taking "adverse actions" against businesses or individuals because of their religious beliefs or moral convictions. But while proponents view the bill as a necessary measure ensuring religious freedom, critics say it's a thinly veiled attempt to undermine LGBTQ rights.

The bill — which has no official connection to Chick-fil-A — received its nickname after the San Antonio City Council banned the fast-food franchise from opening a location in the city's airport because of the company's "legacy of anti-LGBT behavior."

Chick-fil-A has been under fire for its LGBTQ track record since 2012, when it was revealed that the company, through the charity of its founder, S. Truett Cathy, who died in 2014, donated nearly $2 million to groups that oppose same-sex marriage.

"The Save Chick-fil-A law makes it clear in Texas: You don’t mess with Chick-fil-A, and you don’t mess with religious freedom,” Jonathan Saenz, president of the socially conservative Texas Values Action, said in a statement.

Opponents of the bill, however, say the legislation could harm the state’s LGBTQ community and propel discrimination.

"Senate Bill 1978 has one aim only: to undermine LGBTQ equality and promote anti-LGBTQ messages. This bill is nothing more than an anti-LGBTQ dog whistle,” Samantha Smoot, interim executive director of statewide LGBTQ group Equality Texas, said in a statement.

Though the bill does not materially change current state law, as religious freedom is a federal First Amendment protection, others expressed frustration that the bill took priority over other pressing issues.

"In the midst of a legislative session meant to prioritize public school reform, property taxes and expand economic opportunities for all Texans, I am disappointed that SB 1978 took energy away from passing proactive legislation that actually improves Texans' lives," Rep. Mary González, chair of the Texas Legislature's first LGBTQ Caucus, wrote in an emailed statement to NBC News. "Further, in 2017, 42 percent of LGBTQ teens in Texas said they had considered suicide — the harmful rhetoric perpetuated by this bill adds to a culture of bullying, shame and isolation already faced by LGBTQ youth in our state."

Abbott previously suggested he would sign the legislation. Last month, he tweeted: “What are the odds I’ll sign the Chick-fil-A bill? I’ll let you know after dinner,” along with a photo of a Chick-fil-A cup and an article stating that the legislation was headed to his desk for signature.

So. What are the odds I’ll sign the Chick-fil-A bill?



I’ll let you know after dinner.



⁦@ChickfilA⁩ #txlege pic.twitter.com/xKS3vDV4gS — Greg Abbott (@GregAbbott_TX) May 21, 2019

FOLLOW NBC OUT ON TWITTER, FACEBOOK & INSTAGRAM