An optimal compact embedding theorem related to the wave operator on an n -dimensional sphere is established. The existence of nontrivial 2π time periodic solutions of nonlinear wave equations on S n is proved in the case when the nonlinear term g(u) ~ ¦u¦ p − 2 u, p is less than the critical exponent 2(n + 1) (n − 1) , by suitable approximation and variational methods, even though the associated functional does not satisfy the Palais-Smale condition for n odd. Furthermore the regularity of weak solutions is proved for n even by establishing a special L P estimate for the wave operator.