A bill that would ban whale and dolphin captivity in Canada is set to become law.

The House of Commons on Monday agreed to pass Bill S-203 at third reading, paving the way for the legislation to receive Royal Assent. It was passed without amendment by the House fisheries committee in April after nearly three years in the Senate.

Known as the Ending the Captivity of Whales and Dolphins Act, Bill S-203 was first introduced by former senator Wilfred Moore in December 2015. It had languished for years in the Upper Chamber as a result of what proponents called stall tactics by Conservative senators before it was passed and sent to the House last fall.

Sen. Murray Sinclair took over sponsorship of the bill when Moore retired in early 2017.

The bill includes a grandfather clause for those animals already in facilities in Canada, and permits legitimate research and the rescue of animals in distress. It also bans the trade of reproductive materials, but nothing in the legislation would criminalize the conduct of researchers. During committee review in the Senate, it was amended to affirm the rights of Indigenous peoples.

READ MORE: Free Willy’ bill sent to House of Commons for final vote

It passed!!! Whale and dolphin captivity is OUTLAWED in Canada! Thanks so much to everyone who worked on this! pic.twitter.com/G8RPaFKPyK — Camille Labchuk (@CamilleLabchuk) 10 June 2019

Green Party Leader Elizabeth May, who sponsored the bill in the House, said in a statement that “Canadians have been clear, they want the cruel practice of keeping whales and dolphins in captivity to end.”

Last month, Sen. Peter Harder, the government’s representative in the Senate, moved 28 amendments to a separate fisheries bill — C-68 — that included changes to Bill S-203. In a press release, Harder’s office warned that if Bill S-203 was amended in the House, it would return to the Senate to an “uncertain fate in the closing days of Parliament.”

One amendment from Harder to Bill C-68, which passed third reading in the Senate last week, would make it mandatory to have a permit for the importation and exportation of the class of marine mammals that dolphins and whales fall under, known as cetaceans. Another would place the import and export provisions in S-203 under the Fisheries Act, as opposed to the Wild Animal and Plant Protection and Regulation of International and Interprovincial Trade Act.

READ MORE: Shark finning, cetacean captivity amendments could be folded into C-68

This was done because the government preferred to have that the Department of Fisheries administer import and export laws given its “experience, expertise and scientific research,” Harder’s office told iPolitics at that time.

Humane Canada, a federation of SPCAs and humane societies, welcomed the passage of the bill as “ground breaking,” singling out is prohibition of breeding of captive cetaceans as a first for North America.

“We’ve known for some time now that cetaceans are a highly intelligent, social, deep-diving species whose needs simple cannot be met in a tank,” Humane Canada CEO Barbara Cartwright said in a statement.

“Scientific evidence shows that confining whales and dolphins causes them physical and mental pain and suffering.”

Animal Justice, an animal rights advocacy group that vigorously supported the bill, celebrated Monday’s development as a “watershed moment for whales and dolphins” as well as “powerful recognition” that Canada would no longer accept “imprisoning smart, sensitive animals in tiny tanks for entertainment.”

“Canada has long been criticized for having some of the worst animal protection laws in the western world, but today we can be proud to become a world leader in protecting whales and dolphins from the misery and suffering they endure in the aquarium industry,” Animal Justice executive director Camille Labchuk said in a statement, arguing that Bill S-203 marks the first time Parliament has ever passed serious animal protection legislation.

“The tide is finally turning for animals in Canada,” she added.

The People for the Ethical Treatment of Animals, known more popularly by its acronym PETA, also applauded Parliament for passing the bill.

“After protesting cetacean captivity for decades and rallying our supporters to show a wave of support for this landmark bill, PETA is popping the champagne corks today as Canada makes history,” PETA executive vice president Tracy Reiman said in a statement.

*This story has been updated with comment from Humane Canada, Animal Justice and PETA.