Chick-fil-A restaurant (Photo by Alex Wong/Getty Images)

Government officials are not supposed to impose political or religious litmus tests on businesses. They cannot punish them, or even selectively withhold benefits from them, because they made donations to organizations that engaged in political, religious, or charitable activity.

But that’s what San Antonio is doing. It is violating the First Amendment rights of Chick-fil-A. As Fortune notes:

“Don’t plan on getting a Chick-Fil-A sandwich next time you fly through San Antonio Airport. “The city’s district council approved a new concession agreement for the airport on Thursday that will bring in more local establishments and specifically bans the popular chicken sandwich chain. At issue, apparently, is the donation of money by the Chick-Fil-A to groups that have been accused of discriminating against the LGBTQ community.”

The allegedly “discriminatory” groups are three non-profit organizations with charitable aims: the Salvation Army, the Fellowship of Christian Athletes, and the Paul Anderson Youth Home. Whether or not one accepts the strange premise that these are “discriminatory” groups, there is no doubt that they have lawful, charitable aims. The Salvation Army is the classic charity that helps the needy, and it does so very efficiently, with very little administrative expense, very little overhead, and unusually low fundraising expenses. The allegations of bias against the Salvation Army are stale, and perhaps a pretext for attacking it because of its religious nature, because the Salvation Army, according to Think Progress, currently has “a national policy of non-discrimination based on sexual orientation and gender identity.”

Donations to a group are protected by the First Amendment when the group has lawful aims, even if it also has unlawful aims. In Pfizer v. Giles (1994), a federal appeals court ruled that the maker of an asbestos product could not be held liable for joining and financially supporting a trade association that represented makers of asbestos products, even though that association allegedly “disseminated misleading information about the danger of asbestos in schools directly to” the plaintiffs, because “at least some” of the association’s “activities were constitutionally protected.”

Nothing in the news coverage of San Antonio’s action suggests that any of the groups Chick-fil-A is donating to are currently violating any applicable laws, or have unlawful aims.

It is unconstitutional for San Antonio to target Chick-fil-A this way — even indirectly, through restrictions in the city’s agreement with the company running the airport concessions. The City approved the Food, Beverage and Retail Prime Concession Agreement with Paradies Lagardere at the San Antonio International Airport.

Government officials cannot pressure a private company like Paradies to take adverse action against somebody else, like Chick-fil-A, based on their exercise of their First Amendment rights. For example, the federal appeals court in New York ruled that officials could not pressure a billboard company to stop displaying a church’s anti-gay billboard, or pressure a business group not to publish a businessman’s ad in its publication, even though the officials avoided using explicit threats. (See Okwedy v. Molinari (2003)). And it ruled that a village official could not pressure the Chamber of Commerce to not run advertisements from a local business in the Chamber’s publication (See Rattner v. Netburn (1991)).

The Supreme Court has ruled that government officials cannot deprive someone of even a discretionary government benefit, like a government contract, because of their speech on matters of public concern. (See Board of Commissioners v. Umbehr (1996)). Government officials are also not supposed to target businesses, or government employees, based on their exercise of their First Amendment right of free association. The appeals court with jurisdiction over San Antonio has made that clear. (See Boddie v. City of Columbus (1993)). Freedom of association includes the right to make contributions to groups or causes of your own choosing. (See, e.g., Randall v. Sorrell (2006); Pfizer v. Giles (1994)).

So, Chick-fil-A has a First Amendment right to donate to its preferred charities. That is true even if Chick-fil-A’s donations make people who object to them feel “unwelcome.” San Antonio city councilman Robert Trevino thinks otherwise. He said, according to National Review:

“With this decision, the City Council reaffirmed the work our city has done to become a champion of equality and inclusion. 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. … Everyone has a place here, and everyone should feel welcome when they walk through our airport. I look forward to the announcement of a suitable replacement by Paradies.”

As lawyer David French notes, Trevino’s statement is “Orwellian nonsense. This action isn’t based on any alleged mistreatment of gay customers. Instead it’s based on the notion that a person won’t feel ‘welcome’ in an airport because they disagree with the charitable donations of a foundation connected to one of the airport’s vendors.”

Moreover, Chick-fil-A treats its customers well, rather than treating gay customers as not “welcome.” It does not have a history of discriminating against gay patrons.

As I noted back in 2015, a search of Westlaw, an online legal research service, revealed that Chick-fil-A restaurants had unusually few lawsuits against them for discrimination, compared to other fast-food chains. And while other chains faced lawsuits over everything from wage and hour conflicts to sexual harassment, lawsuits by Chick-fil-A employees were “rare.” As I pointed out in The Washington Post, there was also “no evidence that Chick-fil-A discriminates against gay patrons, and it has restaurants in many cities that ban anti-gay discrimination.”

In short, San Antonio would have no reason to think Chick-fil-A would discriminate against gay patrons, and that could thus not be an excuse to exclude it from the airport.

Hans Bader practices law in Washington, D.C. After studying economics and history at the University of Virginia and law at Harvard, he practiced civil-rights, international-trade, and constitutional law. He also once worked in the Education Department.