Using a new type of ion trap, we demonstrate that the length of a packet of charged particles oscillating between two electrostatic mirrors will remain constant under special conditions. The effect can be understood in terms of phase synchronization, where, in a rather counterintuitive way, the repulsive Coulomb interaction between the ions actually holds the packet together. Application of this effect for mass spectrometry is discussed.