  Let $f \colon \mathbb{R}^n \rightarrow \mathbb{R}$ be a polynomial and
$\mathcal{Z}(f)$ its zero set. In this paper, in terms of the so-called Newton
polyhedron of $f,$ we present a necessary criterion and a sufficient condition
for the compactness of $\mathcal{Z}(f).$ From this we derive necessary and
sufficient criteria for the stable compactness of $\mathcal{Z}(f).$
