A multiconfigurational approach to the quantum chemistry of heavy element compounds is described. Relativistic effects are treated in two steps, both based on the Douglas–Kroll Hamiltonian. Scalar terms are included in the basis set generation and are used to determine wave functions and energies, which include static (through the use of the CASSCF method) and dynamic correlation effects (using multiconfigurational perturbation theory, CASPT2). Spin–orbit coupling is treated in a configuration interaction model, which uses CASSCF wave functions as the basis states. The method is shown to work for all atoms of the periodic system, with the possible exception of the heavier fifth row main group atoms. Illustrative results are presented for the main group atoms (spin–orbit splittings), the electronic spectrum of the iridium atom, the ground state of Tl2 and Pb2, and for the electronic spectrum of PbO. Some applications in actinide chemistry are also discussed.