The city argued the ban would improve safety for people and animals, but the provincial governor questioned its legality.