In this paper we propose a new mechanism describing the initial spike of giant flares in the framework of the starquake model. We investigate the evolution of a plasma on a closed magnetic flux tube in the magnetosphere of a magnetar in the case of a sudden energy release and discuss the relationship with observations of giant flares. We perform one-dimensional numerical simulations of the relativistic magnetohydrodynamics in Schwarzschild geometry. We assume energy is injected at the footpoints of the loop by a hot star surface containing random perturbations of the transverse velocity. Alfven waves are generated and propagate upward, accompanying very hot plasma that is also continuously heated by nonlinearly generated compressive waves. We find that the front edges of the fireball regions collide at the top of the tube with their symmetrically launched counterparts. This collision results in an energy release which can describe the light curve of initial spikes of giant flares.