Despite increased sales and attendance, legal costs weighed down SeaWorld Entertainment Inc.'s fourth quarter finances, resulting in a $24.2 million loss.

The Orlando-based theme park operator had announced Feb. 11 that it would pay $65 million to settle a class action suit filed in 2014, as well as a related derivative suit. It said about $45.5 million of that would come from insurance.

On Wednesday, SeaWorld said it took a fourth quarter legal charge of $32.1 million. It also said it had earlier paid $5.1 million in related legal fees.

Neither the company nor general counsel Tony Taylor immediately responded to messages seeking to clarify the legal expenses. Taylor has been with the company since 2010.

SeaWorld has said the settlement was not an admission of wrongdoing. The company was represented by attorneys from Simpson Thacher & Bartlett.

The class action complaint in the U.S. District Court for the Southern District of California alleged that SeaWorld violated securities laws and misled investors over the revenue impact on its business of a 2013 documentary called "Blackfish."

The film documents the captivity and treatment of Tilikum, a performing orca whale held at SeaWorld and involved in the deaths of three people. Tilikum died in 2017.

In a statement about the film, SeaWorld said it was "inaccurate and misleading and, regrettably, exploits a tragedy." The company said the documentary withheld key facts such as how many animals SeaWorld rescues, rehabilitates and returns to the wild each year and how much it spends on conservation and research.

In September 2018, the company, along with former CEO James Atchison and its vice president of communications agreed to pay over $5 million to settle fraud charges by the U.S. Securities and Exchange Commission for misleading investors about the film's impact. SeaWorld was penalized $4 million and Atchison $1 million, without admitting or denying guilt. The vice president of communications, who said he made statements on orders from Atchison, agreed to pay about $100.