We study the formation of coherent structures in a system with long-range interactions where particles moving on a circle interact through a repulsive cosine potential. Nonequilibrium structures are shown to correspond to statistical equilibria of an effective dynamics, which is derived using averaging techniques. This simple behavior might be a prototype of others observed in more complicated systems with long-range interactions, such as two-dimensional incompressible fluids and wave-particle interaction in a plasma.