  We develop the quantum theory of an open-cavity laser assuming that only two
modes compete for gain. We show that the modes interact to build up a
collective mode that becomes the lasing mode when pumping exceeds a threshold.
This collective mode exhibits all the features of a typical laser mode, whereas
its precise behavior depends explicitly on the openness of the cavity. We
approach the problem by using the density-matrix formalism and derive the
master equation for the light field. Our results are of particular interest in
the context random laser systems.
