SeaWorld has ended the orca breeding program, and will ultimately end the practice of keeping the whales in captivity, the company has announced. When the 29 killer whales the company now owns die out, that will be the end of it.

SeaWorld had previously filed a lawsuit against the State of California for the right to continue the breeding program. The California Coastal Commission had approved an expansion of SeaWorld San Diego’s orca habitat, but only on the condition that the breeding program end. The company argued that the commission overstepped its jurisdiction by ruling what SeaWorld does with its orcas, which is a matter governed by federal regulations. It was, very likely, a lawsuit that the company could win .

But the cost of winning that lawsuit would have been years of bad publicity, in addition to enormous legal fees and probable attacks by Anonymous. Every step in the legal proceeding would have generated a new flurry of news articles portraying SeaWorld as the bad guys. That, it seems, was more than the company was willing to sacrifice.

With this latest news, animal rights activists are declaring a decisive victory. The announcement represents “a monumental and important first step forward in achieving a more humane business model for the company,” said Naomi Rose, a marine mammal scientist with the Animal Welfare Institute, in an emailed statement.

SeaWorld’s publicity nightmare began in 2013 with the release of the documentary Blackfish, which explores the death of former orca trainer Dawn Brancheau at the jaws of Tilikum, a killer whale in her care. The film pushes the perspective that keeping orcas in captivity is abusive to the animals and dangerous for any humans in direct contact with them. SeaWorld’s position is that the film is misleading propaganda that distorts the facts to push an anti-captivity agenda.

Despite best efforts, SeaWorld hasn’t been able to shake the reputation, and park attendance has suffered. In addition to ending the breeding program, the company has announced the end of killer whale shows by next year (think less circus, more zoo), and a partnership with the Humane Society of the United States to work on protecting wild marine life and environments.

Photos via Gerardo Mora/Getty Images