The Aley Nb deposit in northern British Columbia, Canada, is hosted by metamorphosed calcite and dolomite carbonatites of anorogenic affinity emplaced in Lower Paleozoic sedimentary carbonate rocks in the Devonian. Primary Nb mineralization consists of pyrochlore (commonly comprising a U–Ta-rich and F-poor core) and ferrocolumbite developed as discrete crystals and replacement products after the pyrochlore. These phases and associated heavy minerals (apatite±magnetite±zircon±baddeleyite) precipitated early in the magmatic history and probably formed laterally extensive cumulate layers up to at least 1.5m in thickness. Fractionation of copious amounts of pyrochlore is reflected in the chemical composition of the carbonatites and their constituent minerals, which show large variations in Nb/Ta value, but a near-chondritic Zr/Hf ratio. Alkali-rich metasomatic rocks (in particular, fenites and glimmerites) associated with the carbonatites are barren; the bulk of Nb in these rocks is contained in rutile, phlogopite and, to a much lesser extent, amphibole. When the passive margin of North America became the zone of plate convergence in the Cretaceous, the host carbonatites were strongly deformed, which is manifested in structures and textures indicative of grain comminution, ductile flow, folding and, locally, brecciation. The structure and continuity of the cumulate units enriched in Nb minerals were profoundly affected by these processes. Interaction of the carbonatites with crustal fluids of complex chemistry resulted in extensive dolomitization, replacement of the pyrochlore and ferrocolumbite by fersmite, and development of hydrothermal parageneses consistent with the lower greenschist-facies conditions. At these late evolutionary stages, Nb was mobilized only to a very limited extent and sequestered in a variety of minerals (fersmite, euxenite, Mg-rich ferrocolumbite and Nb-bearing rutile) typically occurring as scarce minute crystals associated with hydrothermal dolomite, quartz and chlorite. Progressive enrichment of the deformed dolomite carbonatites in heavy C and O isotopes relative to primary calcite, coupled with changes in the trace-element composition of Nb phases, indicate that the fluids were equilibrated with the wall-rock sedimentary rocks hosting the Aley deposit and were capable of transporting F−, (PO4)3−, U, Th and rare-earth elements, but not Nb.