SeaWorld and its former CEO, James Atchison, have agreed to pay more than $5 million to settle federal charges that they covered up the negative impact of the documentary film Blackfish on the company.

The 2013 Magnolia-CNN Films release took viewers behind the scenes of SeaWorld’s popular killer-whale shows to expose dubious practices. Its centerpiece was the story of a trainer who starred in one such show who was dragged into the water, drowned and dismembered by a killer whale in front of park patrons in 2010.

Without admitting or denying wrongdoing, SeaWorld agreed to a $4 million fine. Atchison agreed to pay more than $1 million in fines and “disgorgement,” the legal term for the surrender of ill-gotten gains.

In 2016, SeaWorld ended killer whale shows and its orca breeding programs.

The film, directed by Gabriela Cowperthwaite, grossed more than $2 million in the U.S. and later set ratings records when it aired on CNN.

From December 2013 to August 2014, according to the Securities and Exchange Commission, the company downplayed the film’s negative impact on attendance at its parks. Atchison avoided $730,860 of losses, the SEC said, by selling stock in SeaWorld stock in the first quarter of 2014. He quit as CEO in 2015.

Among those charged was a VP of communications for SeaWorld, Frederick D. Jacobs, who was accused of one count of fraud for his role in the cover-up. He agreed to pay $100,000.

“This case underscores the need for a company to provide investors with timely and accurate information that has an adverse impact on its business. SeaWorld described its reputation as one of its ‘most important assets,’ but it failed to evaluate and disclose the adverse impact Blackfish had on its business in a timely manner,” said Steven Peikin, Co-Director of the SEC Enforcement Division.