(Bloomberg) -- JPMorgan Chase & Co. says it’s being shut out of underwriting municipal-bond deals in Texas after the state enacted a law banning government work with banks that limit business with the firearms industry.

The law, which went into effect in September, prohibits governmental entities from working with a business that “discriminates” against firearm and ammunition businesses or organizations, according to Republican Governor Greg Abbott, who has touted the legislation. 

Texas’s fast-growing population has made it one of the biggest markets for the muni-bond business. This week, JPMorgan was replaced by UBS AG as the underwriter of a bond issue for Texas’s Decatur Hospital Authority, a local agency, according to a bond filing Thursday. 

“While our business practices should permit us to certify, the legal risk associated with this ambiguous law prevents us from bidding on most business right now with Texas public entities,” Patricia Wexler, a spokesperson for the bank, said in an emailed statement. 

The law sought to target financial institutions for policies they’ve taken on in the wake of mass shootings in the U.S., with politicians in the gun-friendly state seeing it as a way of retaliating against them for weighing in on America’s freighted culture wars. Earlier this year, JPMorgan CEO Jamie Dimon told a Congressional committee that his bank won’t finance gun companies that make military-style weapons for consumers.

Read more: BofA, Citi Risk Hit to Business in Texas Over Gun Policies

Still, the effect of the law is not entirely clear in Texas. Another bank that was targeted by the legislation, Citigroup Inc., said in June that it didn’t think it was affected by the law. 

The law applies to a contract that has a value of at least $100,000. 

JPMorgan was credited with working on $3.6 billion of long-term municipal-bond deals in Texas in 2020, according to data compiled by Bloomberg. It was ranked as the seventh-biggest underwriter of deals out of the state. 

This week, JPMorgan was replaced by UBS as the underwriter of a bond issue for the Decatur authority, an arm of a 7,000-person Texas city that operates Wise Health System. In July, the agency had disclosed that it was planning to have JPMorgan serve as senior managing underwriter on a financing that could include the sale of up to $150 million of bonds.

The authority cited “uncertainty related to the implementation of new legislation passed by the State of Texas,” though it didn’t specify which law.  

Todd Scroggins, chief financial officer for Wise Health, didn’t respond to a request for comment, nor did a hospital spokesperson. 

Related: Citi Says It’s Untouched by Texas Gun Law Punishing Wall Street

©2021 Bloomberg L.P.