Some F-rich granitic rocks show anomalous, nonchondritic ratios of Y/Ho, extreme negative Eu anomalies, and unusual, discontinuous, segmented chondrite-normalised plots of rare earth elements (REE). The effects of F-rich fluids have been proposed as one of the explanations for the geochemical anomalies in the evolved granitic systems, as the stability of nonsilicate complexes of individual rare earths may affect the fluid-melt element partitioning. The lanthanide tetrad effect, related to different configurations of 4f-electron subshells of the lanthanide elements, is one of the factors affecting such complexing behaviour. We present the first experimental demonstration of the decoupling of Y and Ho, and the tetrad effect in the partitioning of rare earths between immiscible silicate and fluoride melts. Two types of experiments were performed: dry runs at atmospheric pressure in a high-temperature centrifuge at 1100 to 1200°C, and experiments with the addition of H 2O at 700 to 800°C and 100 MPa in rapid-quench cold-seal pressure vessels. Run products were analysed by electron microprobe (major components), solution-based inductively coupled plasma mass spectrometry (ICP-MS) (REE in the centrifuged runs), and laser ablation ICP-MS (REE and Li in the products of rapid-quench runs). All the dry centrifuge runs were performed at super-liquidus, two-phase conditions. In the experiments with water-bearing mixtures, minor amounts of aqueous vapour were present in addition to the melts. We found that lanthanides and Y concentrated strongly in the fluoride liquids, with two-melt partition coefficients reaching values as high as 100–220 in water-bearing compositions. In all the experimental samples, two-melt partition coefficients of lanthanides show subtle periodicity consistent with the tetrad effect, and the partition coefficient of Y is greater than that of Ho. One of the mixtures also produced abundant fluorite (CaF 2) and cryolite (Na 3AlF 6) crystals, which enabled us to study fluorite-melt and cryolite-melt REE partitioning. REE concentrations in fluorite are high and comparable to those in the fluoride melt. However, fluorite-melt partition coefficients appear to depend mostly on ionic radii and show neither significant tetrad anomalies, nor differences in Y and Ho partitioning. In contrast, REE concentrations in cryolite are low (∼5–10 times lower than in the silicate melt), and cryolite-melt REE partitioning shows very strong tetrad and Y-Ho anomalies. Our results imply that Y-Ho and lanthanide tetrad anomalies are likely to be caused mainly by aluminofluoride complexes, and the tetrad REE patterns in natural igneous rocks can result from fractionation of F-rich magmatic fluids.