Abstract. -A gas of linearly polarizable particles transversely pumped by an off-resonant laser and interacting with the counterpropagating radiation modes of a ring cavity is studied. Depending on the pump intensity and the detunings the gas can form a self-organized density grating that enhances the feeding of the cavity. We investigate the system via a mean-field approach and find the thermodynamic phases of i) uniform distribution, ii) self-organized Bragg lattice, iii) lattice with defects, and iv) instability. The occurrence of these phases as a function of the pump intensity and particle density is fully mapped.The physics of ultracold atoms has been a proliferating field these years. There is a renewed interest in fundamental many-body phenomena which can be investigated in well-controlled, weakly interacting atomic ensembles. Phase transition into a Bose-Einstein condensate is being routinely realized with alkali atoms, and various other manifestations of quantum statistics, superfluidity, etc., are observed. The system of cold atoms is particularly attractive because the collisional properties are partially tunable.The nature of atom-atom interaction is a central issue in the understanding of many-body effects. This interaction is dominated by the dipole-dipole coupling in a dense cloud of cold atoms illuminated by quasi-resonant laser fields. On the one hand, this amounts to a measurable modification of the optical properties of the cloud, e.g., a nonlinear density dependence of the refractive index [1], or slow diffusion of light [2]. On the other hand, it induces interatomic forces, which eventually cause an instability of the homogeneous distribution of the cloud [3].In this letter we analyze a system presenting a strong interplay of the electromagnetic field generating a collective behaviour of an ensemble of polarizable particles, and the backreaction of those particles on the dynamics of the field. The system is shown to produce a phase transition between the homogeneous spatial distribution and a regular pattern bound by the electromagnetic field. This effect can be described in terms of analytical expressions accounting for the density of the particles and laser pumping strength by virtue of the simple geometry.c EDP Sciences Article published by EDP Sciences and available at http://www.edpsciences.org/epl or http://dx