A fast harmonic oscillator is linearly coupled with a system of Ising spins that are in contact with a thermal bath, and evolve under a slow Glauber dynamics at dimensionless temperature theta. The spins have a coupling constant proportional to the oscillator position. The oscillator-spin interaction produces a second order phase transition at theta=1 with the oscillator position as its order parameter: the equilibrium position is zero for theta>1 and non-zero for theta< 1. For theta<1, the dynamics of this system is quite different from relaxation to equilibrium. For most initial conditions, the oscillator position performs modulated oscillations about one of the stable equilibrium positions with a long relaxation time. For random initial conditions and a sufficiently large spin system, the unstable zero position of the oscillator is stabilized after a relaxation time proportional to theta. If the spin system is smaller, the situation is the same until the oscillator position is close to zero, then it crosses over to a neighborhood of a stable equilibrium position about which keeps oscillating for an exponentially long relaxation time. These results of stochastic simulations are predicted by modulation equations obtained from a multiple scale analysis of macroscopic equations.