The Mermin-Wagner theorem is strengthened so as to rule out magnetic long-range order at
T>0 in one- or two-dimensional Heisenberg and XY systems with long-range interactions decreasing as ${R}^{\ensuremath{-}\ensuremath{\alpha}}$ with a sufficiently large exponent $\ensuremath{\alpha}$. For oscillatory interactions, ferromagnetic long-range order at
T>0 is ruled out if $\ensuremath{\alpha}\ensuremath{\ge}1(D\phantom{\rule{0ex}{0ex}}=\phantom{\rule{0ex}{0ex}}1)$ or $\ensuremath{\alpha}>5/2(D\phantom{\rule{0ex}{0ex}}=\phantom{\rule{0ex}{0ex}}2)$. For systems with monotonically decreasing interactions, ferro- or antiferromagnetic long-range order at
T>0 is ruled out if $\ensuremath{\alpha}\ensuremath{\ge}2D$.
Thin films are described as idealized systems having finite extent in one direction but infinite extent in the other two. For systems of particles interacting through smooth potentials (e.g., no hard cores), it is shown that an equilibrium state for a homogeneous thin film is necessarily invariant under any continuous internal symmetry group generated by a conserved density. For short-range interactions it is also shown that equilibrium states are necessarily translation invariant. The absence of long-range order follows from its relation to broken symmetry. The only properties of the state required for the proof are local normality, spatial translation invariance, and the Kubo-Martin-Schwinger boundary condition. The argument employs the Bogoliubov inequality and the techniques of the algebraic approach to statistical mechanics. For inhomogeneous systems, the same argument shows that all order parameters defined by anomalous averages must vanish. Identical results can be obtained for systems with infinite extent in one direction only.