The simultaneous presence of a long-range isotropic antiferromagnetic interaction decaying as 1/r3 (where r is the spin-spin distance) and of a dipolar interaction in the square planar rotator model is studied. The pure isotropic antiferromagnetic interaction does not support long-range order, at variance with the pure dipole interaction. The model is investigated analytically at low temperature and by Monte Carlo (MC) simulations at higher temperature. The Luttinger-Tisza method provides a ground-state configuration affected by continuous degeneracy. Thermal fluctuations accounted for by the linear spin-wave approximation lift the degeneracy and lead to order by thermal disorder. Different kinds of order are found going from a pure antiferromagnetic to a pure dipole interaction. The mechanism that restores long-range order is understood by using the renormalized spin-wave theory. The accidental soft mode related to the continuous degeneracy of the ground state is replaced by a temperature-dependent gap. Temperature-driven first-order phase transitions between different ordered phases are investigated via a Landau functional. The phase diagram of the model is obtained by study of the order parameter, specific heat, and staggered magnetization evaluated by MC simulations.