Defense costs incurred by UBS Group AG over litigation allegedly linked to securities law violations in 2009 are not covered by an insurance policy the Swiss banking giant later bought, a U.S. appeals court ruled, upholding a lower court ruling.

The liability policy, issued by XL Specialty Insurance Co. and supported by excess policies issued by units of Axis Capital Holdings Ltd. and Hartford Financial Services Group Inc., specifically excluded legal expense claims related to subsequent litigation, the 1st U.S. Circuit Court of Appeals, which is based in Boston, ruled on Wednesday.

The case pits giants from the banking and insurance industries against each other, Judge Juan R. Torruella wrote in UBS Financial Services Inc. of Puerto Rico and UBS Trust Co. of Puerto Rico v. XL Specialty Insurance Co., Axis Reinsurance Co. and Hartford Fire Insurance Co.

“In this case, titans of their respective industries clash as to the interpretation of an exclusion clause in an insurance policy representing millions of dollars in potential coverage. In the process of deciding this appeal, we are granted a glimpse into the ethics that apparently prevail in some sectors of the financial industry,” the judge wrote in the ruling.

The case involves allegations against UBS related to its handling of Puerto Rican municipal bond investments. UBS, through its various units, was an underwriter for the bonds and sold shares in closed-end funds containing municipal bonds and was involved in managing 23 closed-end funds.

According to court papers, the U.S. Securities and Exchange Commission began investigating UBS in 2009 for violations of securities laws. The SEC ultimately concluded that UBS misrepresented risks associated with shares in the funds and effectively controlled the prices of the shares by controlling sales in the secondary market for the shares, among other things. UBS paid $26 million to settle the SEC charges.

In 2010, investors from the funds sued UBS claiming the bank operated on all sides of the fund transactions and manipulated the bond market to the detriment of investors and used the funds as a “dumping ground” for “toxic pension bonds,” court papers say.

In 2011, UBS sought new insurance coverage for legal disputes through its broker Marsh LLC. XL, which is now a unit of Axa SA, provided primary coverage with a $10 million limit, Axis provided $5 million in coverage on the first excess layer and Hartford provided another $5 million in coverage on a second excess layer.

In the coverage negotiations, UBS requested numerous wording changes, many of which XL agreed to, but it did not agree to changes to the “specific litigation exclusion,” court papers say.

The exclusion barred coverage for claims connected to the 2009 SEC investigation and the 2010 investor lawsuit or “in any way” involving the proceedings, the ruling states.

“Crucially, during negotiations, UBS attempted to narrow the scope of the specific litigation exclusion, but XL rejected the proposed changes,” the ruling states.

After the coverage was purchased, UBS faced additional lawsuits, arbitration proceedings and another SEC investigation related to its activities in the Puerto Rico bond market.

In 2013, UBS notified XL of expected claims related to the later litigation, but XL denied coverage of defense costs citing the specific litigation exclusion.

UBS and the insurers both filed for summary judgment in 2017. UBS argued the insurers interpreted the exclusion too broadly and that the later legal costs were covered and that claims that occurred after the policy period were “interrelated” with claims during the period the policy was in force. The district court in Puerto Rico ruled for the insurers.

On appeal, UBS argued among other things that the exclusion only applied when there was “substantial overlap” of relevant facts between the prior and current cases.

The appeals court ruled, however, that the terms of the policy are broad “and do not require that the overlap be substantial.”

“Although the language is undoubtedly broad, it was the language UBS bargained for,” the ruling states.

A spokesman for UBS declined to comment on the litigation.