A multireference perturbation method is formulated, that uses an optimized partitioning. The zeroth-order energies are chosen in a way that guarantees vanishing the first neglected term in the perturbational ansatz for the wave function, ⌿ (n) ϭ0. This procedure yields a family of zeroth-order Hamiltonians that allows for systematic control of errors arising from truncating the perturbative expansion of the wave function. The second-order version of the proposed method, denoted as MROPT͑2͒, is shown to be ͑almost͒ size-consistent. The slight extensivity violation is shown numerically. The total energies obtained with MROPT͑2͒ are similar to these obtained using the multireference configuration interaction method with Davidson-type corrections. We discuss connections of the MROPT͑2͒ method to related approaches, the optimized partitioning introduced by Szabados and Surján and the linearized multireference coupled-cluster method. The MROPT͑2͒ method requires using state-optimized orbitals; we show on example of N 2 that using Hartree-Fock orbitals for some excited states may lead to nonphysical results.