Canada is freeing Willy.

In a landmark decision, the country's lawmakers have made it illegal to breed whales and dolphins — or even keep them in captivity.

While Canadian law has long held people and organizations accountable for mistreating marine animals, the new legislation would make it a crime to simply keep one.

The bill covers all captive cetaceans — whales, dolphins and porpoises — and establishes fines of up to $200,000 for violations.

“This is a watershed moment for whales and dolphins, and powerful recognition that our country no longer accepts imprisoning smart, sensitive animals in tiny tanks for entertainment,” Camille Labchuk, executive director of Animal Justice, noted in a press release.

Lawmakers passed Bill S-203, also known as "Free Willy," on June 10. But aquariums — Canada currently has two facilities that keep dolphins and whales in captivity — may have seen the writing on the wall long before the bill began its journey through the nation's legislative gauntlet in 2015.

Last year, the Vancouver Aquarium, which has kept dolphins and whales for more than 50 years, announced it would phase out its cetacean program by 2029.

Marineland, the other facility that keeps captive cetaceans, has taken a different approach, lobbying against the bill every step of the way. Indeed, the amusement park has even suggested the bill would make it necessary to terminate late-stage pregnancies of beluga whales.

A close-up of a beluga whale in the water. Beluga whales are remarkably social animals, using a massive range of clicks, whistles and clangs to communicate with their kind. (Photo: Luna Vandoorne/Shutterstock)

In addition to the ban on owning whales and dolphins, the ban includes a provision making their import and export illegal. The sole exceptions to that rule would be for scientific research or if it's deemed "in the best interest" of that animal.

Facilities that already have marine animals, however, will be allowed to keep them under the bill's grandfather clause.

The Free Willy legislation still needs royal assent before it becomes law — but that approval from the governor general's office has traditionally been little more than a formality for Canadian legislation.

"Today's a really good day for animals in Canada," Green Party Leader Elizabeth May, who sponsored the bill back in 2015, told reporters this week.

"Many scientists testified to why it was critical that we stop keeping cetaceans in captivity. We understand why because they are obviously not akin to other animals, for instance, livestock. Cetaceans require the ocean, they require the space, they require acoustic communication over long distances."

Canada bans all captive whales and dolphins
New 'Free Willy' bill will make it illegal to keep a whale or dolphin in captivity in Canada.