A British Columbia court has ruled that Vancouver's park board didn't have the authority to ban whales, dolphins and porpoises at the city's aquarium.

The decision follows Vancouver Aquarium's announcement last month that it will end the practice of displaying cetaceans in captivity.

The Ocean Wise Conservation Association, the non-profit society that runs the aquarium, filed an application for judicial review last year challenging a bylaw amendment passed by the park board in May 2017 which prohibited keeping cetaceans in parks.

The aquarium has faced increased public scrutiny after the high-profile deaths of a number of its captive cetaceans in recent years, including beluga whales Aurora and Qila. (Darryl Dick/The Canadian Press)

The aquarium has a licensing agreement with the park board that allows it to operate within Stanley Park.

B.C. Supreme Court Justice Andrew Mayer says the agreement states the board will not interfere with the day-to-day administration of the aquarium, and as a result the bylaw amendment is unenforceable against the facility.

He stopped short of striking down the bylaw completely, saying such amendments would be enforceable in parks and facilities that don't include the Marine Science Centre in Stanley Park.

The park board said in a statement that it is disappointed in the ruling, and will be reviewing the judgment before making any further comments.

The aquarium did not make anyone available for comment, but said in a statement that it was pleased with the ruling.

"We will need to take the time necessary to review the judgment with our legal counsel and consider the implications it may have on our organization before determining our future course of action," reads the statement.

The aquarium only has one remaining captive cetacean, a Pacific white-sided dolphin named Helen.