The composition of calcite and dolomite from several carbonatite complexes (including a large set of petrographically diverse samples from the Aley complex in Canada) was studied by electron-microprobe analysis and laserablation inductively-coupled-plasma mass-spectrometry to identify the extent of substitution of rare-earth and other trace elements in these minerals and the effects of different igneous and postmagmatic processes on their composition. Analysis of the newly acquired and published data shows that the contents of rare-earth elements (REE) and certain REE ratios in magmatic calcite and dolomite are controlled by crystal fractionation of fluorapatite, monazite and, possibly, other minerals. Enrichment in REE observed in some samples (up tõ 2000 ppm in calcite) cannot be accounted for by coupled substitutions involving Na, P or As. At Aley, the REE abundances and chondrite-normalized (La/Yb) cn ratios in carbonates decrease with progressive fractionation. Sequestration of heavy REE from carbonatitic magma by calcic garnet may be responsible for a steeply sloping Bexponential^pattern and lowered Ce/Ce* ratios of calcite from Magnet Cove (USA) and other localities. Alternatively, the low levels of Ce and Mn in these samples could result from preferential removal of these elements by Ce 4+ -and Mn 3+ -bearing minerals (such as cerianite and spinels) at increasing f(O 2 ) in the magma. The distribution of large-ion lithophile elements (LILE = Sr, Ba and Pb) in rock-forming carbonates also shows trends indicative of crystal fractionation effects (e.g., concomitant depletion in Ba + Pb at Aley, or Sr + Ba at Kerimasi), although the phases responsible for these variations cannot be identified unambiguously at present. Overall, element ratios sensitive to the redox state of the magma and its complexing characteristics (Eu/Eu*, Ce/Ce* and Y/Ho) are least variable and in both primary calcite and dolomite, approach the average chondritic values. In consanguineous rocks, calcite invariably has higher REE and LILE levels than dolomite. Hydrothermal reworking of carbonatites does not produce a unique geochemical fingerprint, leading instead to a variety of evolutionary trends that range from light-REE and LILE enrichment (Turiy Mys, Russia) to heavy-REE enrichment and LILE depletion (Bear Lodge, USA). These differences clearly attest to variations in the chemistry of carbonatitic fluids and, consequently, their ability to mobilize specific trace elements from earlier-crystallized minerals. An important telltale indicator of hydrothermal reworking is deviation from the primary, chondrite-like REE ratios (in particular, Y/Ho and Eu/Eu*), accompanied by a variety of other compositional changes depending on the redox state of the fluid (e.g., depletion of carbonates in Mn owing to its oxidation and sequestration by secondary oxides). The effect of supergene processes was studied on a single sample from Bear Lodge, which shows extreme depletion in Mn and Ce (both due to oxidation), coupled with enrichment in Pb and U, po...