We have determined the partitioning of a wide range of trace elements between silicate melts and CaSiO3 and MgSiO3 perovskites using both laser ablation-ICPMS and ion microprobe techniques. Our results show that, with the exception of Sc, Zr, and Hf, all trace elements we considered are incompatible in MgSiO3 perovskite, from highly incompatible for U, Th, Ba, La, Sr and monovalent elements to slightly incompatible for heavy rare earth elements. MgSiO3 perovskite-melt partition coefficients increase slightly with Al content in the perovskite. These observations contrast strongly with partitioning between CaSiO3 perovskite and silicate melts. In the latter case, all rare earth elements are clearly compatible as are U and Th. Our data also suggest that, contrary to pressure and temperature, melt composition can significantly affect CaSiO3 perovskite-melt partitioning; partition coefficients for rare earth elements and U and Th increase with decreasing CaO melt content. The presence of ∼0.4 wt% water in melt makes little difference, however. Partitioning of trace elements into the large site of both MgSiO3 and CaSiO3 perovskites follows the near-parabolic dependence on ionic radius predicted from the lattice strain model. The peaks of the parabolae are much higher for the CaSiO3 phase, perhaps suggesting that the mechanisms of charge compensation for heterovalent substitution are different in the two cases. Our partitioning data have been used to assess the potential effect of perovskite fractionation into the lower mantle during early Earth history. Crystallisation of less than 8% of a mixture of CaSiO3 and MgSiO3 perovskites could have led to a 'layer' enriched in U and Th without disturbing the chondritic pattern of refractory lithophile elements in the primitive upper mantle. The resultant reservoir could have high Sm/Nd, U/Pb, Sr/Rb, Lu/Hf ratios similar to the HIMU component of ocean island basalts, but would not balance the observed depletion of the primitive upper mantle in Si and Nb.