The conditions under which the phase space trajectories of a perturbed Hamiltonian system preserve conditional periodicity are investigated. It is shown that the sufficient and necessary condition for the stability of the system is the self-adjointness of the Liouville operator in the Hilbert space of functions absolute square integrable on the energy surface of the system in the phase space.