The Town of Banff is an incorporated municipality located inside a national park. National parks are under the jurisdiction of the Government of Canada, so there is a unique overlap of responsibility and authority between the local government, the Province of Alberta, and the federal government.
At Banff’s incorporation a special agreement was made to determine which powers would be transferred to the town and which powers would stay with the federal government. This is called The Town of Banff Incorporation Agreement.
The Town of Banff Incorporation Agreement ( PDF)